C#Code
C#Code
Public Member Functions | Properties | Private Types | Private Member Functions | Private Attributes
TheForum.GameCode.BlankPostBackground Class Reference

List of all members.

Public Member Functions

 BlankPostBackground ()
void Create (float width, float height, AssetManager assetM)
void Update (int framesPassed)
void Render (GraphicsDevice device)
 BlankPostBackground ()
void Create (float width, float height, AssetManager assetM)
void Update (int framesPassed)
void Render (GraphicsDevice device)

Properties

Vector3 Position [get, set]

Private Types

enum  PostCorners {
  TOP_LEFT = 0, TOP_RIGHT = 1, BOTTOM_LEFT = 2, BOTTOM_RIGHT = 3,
  TOP_LEFT = 0, TOP_RIGHT = 1, BOTTOM_LEFT = 2, BOTTOM_RIGHT = 3
}
enum  PostSides {
  TOP = 0, RIGHT = 1, BOTTOM = 2, LEFT = 3,
  TOP = 0, RIGHT = 1, BOTTOM = 2, LEFT = 3
}
enum  PostCorners {
  TOP_LEFT = 0, TOP_RIGHT = 1, BOTTOM_LEFT = 2, BOTTOM_RIGHT = 3,
  TOP_LEFT = 0, TOP_RIGHT = 1, BOTTOM_LEFT = 2, BOTTOM_RIGHT = 3
}
enum  PostSides {
  TOP = 0, RIGHT = 1, BOTTOM = 2, LEFT = 3,
  TOP = 0, RIGHT = 1, BOTTOM = 2, LEFT = 3
}

Private Member Functions

 ~BlankPostBackground ()
VertexPositionNormalTexture[] CreateVertexQuad (Vector2 textureTL, Vector2 textureBR, Vector2 dims, bool center)
Libraries._3D.BaseObj3D CreateBasicShape (string textureName, Vector2 texUVTL, Vector2 texUVBR, AssetManager assetM, Vector2 dims)
 ~BlankPostBackground ()
VertexPositionNormalTexture[] CreateVertexQuad (Vector2 textureTL, Vector2 textureBR, Vector2 dims, bool center)
Libraries._3D.BaseObj3D CreateBasicShape (string textureName, Vector2 texUVTL, Vector2 texUVBR, AssetManager assetM, Vector2 dims)

Private Attributes

Vector3 m_pos
 Display coordinate for the upper left corner of the post.
Offset3DObj[] m_corners = new Offset3DObj[4]
 Store one sprite for each corner of the post.
Offset3DObj[] m_sides = new Offset3DObj[4]
 Store one sprite for each side of the post.
Offset3DObj m_postInnerBackground
 The inner background of the post, the color. This should be behind everything.
float m_horiLineThickness = .1f
float m_vertLineThickness = .1f

Detailed Description

Used to display the background for a post. This is just the blank background, no text or anything.


Member Enumeration Documentation

Indexes into the post's corner sprite array.

Enumerator:
TOP_LEFT 
TOP_RIGHT 
BOTTOM_LEFT 
BOTTOM_RIGHT 
TOP_LEFT 
TOP_RIGHT 
BOTTOM_LEFT 
BOTTOM_RIGHT 

Indexes into the post's corner sprite array.

Enumerator:
TOP_LEFT 
TOP_RIGHT 
BOTTOM_LEFT 
BOTTOM_RIGHT 
TOP_LEFT 
TOP_RIGHT 
BOTTOM_LEFT 
BOTTOM_RIGHT 

Indexes into the post's sides sprite array.

Enumerator:
TOP 
RIGHT 
BOTTOM 
LEFT 
TOP 
RIGHT 
BOTTOM 
LEFT 

Indexes into the post's sides sprite array.

Enumerator:
TOP 
RIGHT 
BOTTOM 
LEFT 
TOP 
RIGHT 
BOTTOM 
LEFT 

Constructor & Destructor Documentation

TheForum.GameCode.BlankPostBackground.BlankPostBackground ( )

Default constructor.

TheForum.GameCode.BlankPostBackground.~BlankPostBackground ( ) [private]

Destructor.

TheForum.GameCode.BlankPostBackground.BlankPostBackground ( )

Default constructor.

TheForum.GameCode.BlankPostBackground.~BlankPostBackground ( ) [private]

Destructor.


Member Function Documentation

void TheForum.GameCode.BlankPostBackground.Create ( float  width,
float  height,
AssetManager  assetM 
)

Creates the post, generating the display pieces for the given size post.

width, height - Width and height of the post. Everything in the post fits in here.
assetM - Asset manager to use for the textures.
void TheForum.GameCode.BlankPostBackground.Create ( float  width,
float  height,
AssetManager  assetM 
)

Creates the post, generating the display pieces for the given size post.

width, height - Width and height of the post. Everything in the post fits in here.
assetM - Asset manager to use for the textures.
Libraries._3D.BaseObj3D TheForum.GameCode.BlankPostBackground.CreateBasicShape ( string  textureName,
Vector2  texUVTL,
Vector2  texUVBR,
AssetManager  assetM,
Vector2  dims 
) [private]

Create a 3D object with the given properties.

textureName - Texture to load/use.
texUVTL, texUVBR - Top left and bottom right texture coords.
assetM - Asset manager to use for the texture.
dims - Dimensions of the piece in model space.
center - True if the object should be centered, false if it starts at the top left.
Return:
Value is the generated object. It is null if the object could not be created.
Libraries._3D.BaseObj3D TheForum.GameCode.BlankPostBackground.CreateBasicShape ( string  textureName,
Vector2  texUVTL,
Vector2  texUVBR,
AssetManager  assetM,
Vector2  dims 
) [private]

Create a 3D object with the given properties.

textureName - Texture to load/use.
texUVTL, texUVBR - Top left and bottom right texture coords.
assetM - Asset manager to use for the texture.
dims - Dimensions of the piece in model space.
center - True if the object should be centered, false if it starts at the top left.
Return:
Value is the generated object. It is null if the object could not be created.
VertexPositionNormalTexture [] TheForum.GameCode.BlankPostBackground.CreateVertexQuad ( Vector2  textureTL,
Vector2  textureBR,
Vector2  dims,
bool  center 
) [private]

Creates a sets of verticies that form a textured quad. The quad is centered. The normal faces in the negative z direction.

textureTL - Top left texture coordinate.
textureBR - Bottom right texture coordinate.
dims - Dimensions of the quad in world space.
center - True if the shape should be centered, false if they should extend +x, -y.

Return:
Value is the verticies that make up the quad.
VertexPositionNormalTexture [] TheForum.GameCode.BlankPostBackground.CreateVertexQuad ( Vector2  textureTL,
Vector2  textureBR,
Vector2  dims,
bool  center 
) [private]

Creates a sets of verticies that form a textured quad. The quad is centered. The normal faces in the negative z direction.

textureTL - Top left texture coordinate.
textureBR - Bottom right texture coordinate.
dims - Dimensions of the quad in world space.
center - True if the shape should be centered, false if they should extend +x, -y.

Return:
Value is the verticies that make up the quad.
void TheForum.GameCode.BlankPostBackground.Render ( GraphicsDevice  device)

Render the piece.

device - Device to render the piece with.
void TheForum.GameCode.BlankPostBackground.Render ( GraphicsDevice  device)

Render the piece.

device - Device to render the piece with.
void TheForum.GameCode.BlankPostBackground.Update ( int  framesPassed)

Update the piece.

framesPassed - How long has passed since the previous update.
void TheForum.GameCode.BlankPostBackground.Update ( int  framesPassed)

Update the piece.

framesPassed - How long has passed since the previous update.

Member Data Documentation

Store one sprite for each corner of the post.

Used when creating the border for a post. They are the dimensions to set the thickness for the borders in space. The larger it is, the thicker the boarder.

Display coordinate for the upper left corner of the post.

The inner background of the post, the color. This should be behind everything.

Store one sprite for each side of the post.


Property Documentation

Vector3 TheForum::GameCode.BlankPostBackground::Position [get, set]

Getter/Setter for the piece position.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Properties