C#Code
C#Code
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
Libraries._3D.BaseModel Class Reference

List of all members.

Public Member Functions

 BaseModel ()
 BaseModel (Obj3DPoints obj)
 BaseModel (string ID)
virtual void Update (int timePassed)
virtual void Render (Microsoft.Xna.Framework.Graphics.GraphicsDevice device)
void StoreObj3D (Obj3DPoints obj)
bool StoreProperty (ModelProperties.BaseModelProperty property)
StringType GetID ()
void SetID (string ID)
void SetAllowUpdate (bool allow)
void SetAllowRender (bool allow)
Microsoft.Xna.Framework.Graphics.VertexPositionNormalTexture[] GetVerts ()
Libraries._3D.BaseObj3D GetObj3D ()
Shaders.BaseShaderProperty GetShaderProperty (string type)
ModelProperties.BaseModelProperty GetModelProperty (string ID)
void RemoveModelProperty (string ID)
Libraries.Shaders.Shader GetShader ()
virtual void SetPos (Microsoft.Xna.Framework.Vector3 pos)
virtual void SetRot (Microsoft.Xna.Framework.Vector3 rot)
virtual void SetScale (Microsoft.Xna.Framework.Vector3 scale)
void SetShader (Libraries.Shaders.Shader shader)
 BaseModel ()
 BaseModel (Obj3DPoints obj)
 BaseModel (string ID)
void Update (int timePassed)
void Render (Microsoft.Xna.Framework.Graphics.GraphicsDevice device)
void StoreObj3D (Obj3DPoints obj)
bool StoreProperty (ModelProperties.BaseModelProperty property)
StringType GetID ()
void SetID (string ID)
void SetAllowUpdate (bool allow)
void SetAllowRender (bool allow)
Microsoft.Xna.Framework.Graphics.VertexPositionNormalTexture[] GetVerts ()
Libraries._3D.BaseObj3D GetObj3D ()
Shaders.BaseShaderProperty GetShaderProperty (string type)
ModelProperties.BaseModelProperty GetModelProperty (string ID)
void RemoveModelProperty (string ID)
Libraries.Shaders.Shader GetShader ()
virtual void SetPos (Microsoft.Xna.Framework.Vector3 pos)
virtual void SetRot (Microsoft.Xna.Framework.Vector3 rot)
virtual void SetScale (Microsoft.Xna.Framework.Vector3 scale)
void SetShader (Libraries.Shaders.Shader shader)

Protected Member Functions

void UpdateProperties (int timePassed)
void UpdateProperties (int timePassed)

Protected Attributes

List
< ModelProperties.BaseModelProperty
m_modelProps
 Stores the model properties.
Obj3DPoints m_object
 3D object.
bool m_allowUpdate
 True if the model is allowed to update, false if not.
bool m_allowRender
 True if the model is allowed to render, false if not.

Private Member Functions

int GetPropertyInd (string ID)
int GetPropertyInd (string ID)

Private Attributes

StringType m_ID
 ID that represents the model. If this is null then the model is unnamed and can't be specificly requested from a manager.

Detailed Description

A base 3D model class. Derive actual models from it. Handles a 3D object and properties to apply to the object.


Constructor & Destructor Documentation

Libraries._3D.BaseModel.BaseModel ( )

Default constructor.

Libraries._3D.BaseModel.BaseModel ( Obj3DPoints  obj)

Constructor.

obj - 3D object to store.
Libraries._3D.BaseModel.BaseModel ( string  ID)

Constructor.

ID - ID that represents the model.
Libraries._3D.BaseModel.BaseModel ( )

Default constructor.

Libraries._3D.BaseModel.BaseModel ( Obj3DPoints  obj)

Constructor.

obj - 3D object to store.
Libraries._3D.BaseModel.BaseModel ( string  ID)

Constructor.

ID - ID that represents the model.

Member Function Documentation

StringType Libraries._3D.BaseModel.GetID ( )

Returns the ID of the model.

Return:
Value is the model's ID. Value is null if the model does not have a ID.

StringType Libraries._3D.BaseModel.GetID ( )

Returns the ID of the model.

Return:
Value is the model's ID. Value is null if the model does not have a ID.

ModelProperties.BaseModelProperty Libraries._3D.BaseModel.GetModelProperty ( string  ID)

Get the model property with the given ID.

ID - ID of the model property to get.

Return:
Value is the matching model property, null if no match was found.
ModelProperties.BaseModelProperty Libraries._3D.BaseModel.GetModelProperty ( string  ID)

Get the model property with the given ID.

ID - ID of the model property to get.

Return:
Value is the matching model property, null if no match was found.
Libraries._3D.BaseObj3D Libraries._3D.BaseModel.GetObj3D ( )

Get the 3D object stored in the model.

Value is the 3D object stored in the model, null if none.

Libraries._3D.BaseObj3D Libraries._3D.BaseModel.GetObj3D ( )

Get the 3D object stored in the model.

Value is the 3D object stored in the model, null if none.

int Libraries._3D.BaseModel.GetPropertyInd ( string  ID) [private]

Finds where the property with the given ID is stored at in the model list.

ID - ID of the property to find.

Return:
Value is the index the property is stored at, -1 if no matching property was found.
int Libraries._3D.BaseModel.GetPropertyInd ( string  ID) [private]

Finds where the property with the given ID is stored at in the model list.

ID - ID of the property to find.

Return:
Value is the index the property is stored at, -1 if no matching property was found.
Libraries.Shaders.Shader Libraries._3D.BaseModel.GetShader ( )

Get the model's shader.

Return:
Value is the model's shader, null if no shader is stored.

Libraries.Shaders.Shader Libraries._3D.BaseModel.GetShader ( )

Get the model's shader.

Return:
Value is the model's shader, null if no shader is stored.

Shaders.BaseShaderProperty Libraries._3D.BaseModel.GetShaderProperty ( string  type)

Get the model's shader.

Return:
Value is the model's shader, null if no shader is stored.

Shaders.BaseShaderProperty Libraries._3D.BaseModel.GetShaderProperty ( string  type)

Get the model's shader.

Return:
Value is the model's shader, null if no shader is stored.

Microsoft.Xna.Framework.Graphics.VertexPositionNormalTexture [] Libraries._3D.BaseModel.GetVerts ( )

Get the vertex array that makes up the object.

Value is the vertex array that makes up the object, null if none exists.

Microsoft.Xna.Framework.Graphics.VertexPositionNormalTexture [] Libraries._3D.BaseModel.GetVerts ( )

Get the vertex array that makes up the object.

Value is the vertex array that makes up the object, null if none exists.

void Libraries._3D.BaseModel.RemoveModelProperty ( string  ID)

Remove the model property with the given ID.

ID - ID of the model property to remove.
void Libraries._3D.BaseModel.RemoveModelProperty ( string  ID)

Remove the model property with the given ID.

ID - ID of the model property to remove.
virtual void Libraries._3D.BaseModel.Render ( Microsoft.Xna.Framework.Graphics.GraphicsDevice  device) [virtual]

Render the model.

device - Graphics device to render with.
void Libraries._3D.BaseModel.Render ( Microsoft.Xna.Framework.Graphics.GraphicsDevice  device)

Render the model.

device - Graphics device to render with.
void Libraries._3D.BaseModel.SetAllowRender ( bool  allow)

Set wether the model is allowed to render.

allow - Value should be true if the model is allowed to render, false if not.
void Libraries._3D.BaseModel.SetAllowRender ( bool  allow)

Set wether the model is allowed to render.

allow - Value should be true if the model is allowed to render, false if not.
void Libraries._3D.BaseModel.SetAllowUpdate ( bool  allow)

Set wether the model is allowed to update.

allow - Value should be true if the model is allowed to update, false if not.
void Libraries._3D.BaseModel.SetAllowUpdate ( bool  allow)

Set wether the model is allowed to update.

allow - Value should be true if the model is allowed to update, false if not.
void Libraries._3D.BaseModel.SetID ( string  ID)

Sets the ID of the model to the given ID.

ID - ID to use. If null the the model will be changed to a unnamed model.
void Libraries._3D.BaseModel.SetID ( string  ID)

Sets the ID of the model to the given ID.

ID - ID to use. If null the the model will be changed to a unnamed model.
virtual void Libraries._3D.BaseModel.SetPos ( Microsoft.Xna.Framework.Vector3  pos) [virtual]

Set the 3D object position to the given position. If no 3D object is stored then nothing happens.

virtual void Libraries._3D.BaseModel.SetPos ( Microsoft.Xna.Framework.Vector3  pos) [virtual]

Set the 3D object position to the given position. If no 3D object is stored then nothing happens.

virtual void Libraries._3D.BaseModel.SetRot ( Microsoft.Xna.Framework.Vector3  rot) [virtual]

Set the 3D object rotation to the given rotation. If no 3D object is stored then nothing happens.

virtual void Libraries._3D.BaseModel.SetRot ( Microsoft.Xna.Framework.Vector3  rot) [virtual]

Set the 3D object rotation to the given rotation. If no 3D object is stored then nothing happens.

virtual void Libraries._3D.BaseModel.SetScale ( Microsoft.Xna.Framework.Vector3  scale) [virtual]

Set the 3D object scale to the given scale. If no 3D object is stored then nothing happens.

virtual void Libraries._3D.BaseModel.SetScale ( Microsoft.Xna.Framework.Vector3  scale) [virtual]

Set the 3D object scale to the given scale. If no 3D object is stored then nothing happens.

void Libraries._3D.BaseModel.SetShader ( Libraries.Shaders.Shader  shader)

Set the model's shader to be the given shader.

shader - Shader to store.
void Libraries._3D.BaseModel.SetShader ( Libraries.Shaders.Shader  shader)

Set the model's shader to be the given shader.

shader - Shader to store.
void Libraries._3D.BaseModel.StoreObj3D ( Obj3DPoints  obj)

Store the 3D object contained in the model.

obj - Object to store.
void Libraries._3D.BaseModel.StoreObj3D ( Obj3DPoints  obj)

Store the 3D object contained in the model.

obj - Object to store.
bool Libraries._3D.BaseModel.StoreProperty ( ModelProperties.BaseModelProperty  property)

Store the given property in the model, if possible.

property - Property to store.
bool Libraries._3D.BaseModel.StoreProperty ( ModelProperties.BaseModelProperty  property)

Store the given property in the model, if possible.

property - Property to store.
void Libraries._3D.BaseModel.Update ( int  timePassed)

Update the model.

timePassed - How much the update should handle.
virtual void Libraries._3D.BaseModel.Update ( int  timePassed) [virtual]

Update the model.

timePassed - How much the update should handle.
void Libraries._3D.BaseModel.UpdateProperties ( int  timePassed) [protected]

Update the properties in the model and set the model properties with the updated properties, if any.

timePassed - How much time the update is for.
void Libraries._3D.BaseModel.UpdateProperties ( int  timePassed) [protected]

Update the properties in the model and set the model properties with the updated properties, if any.

timePassed - How much time the update is for.

Member Data Documentation

True if the model is allowed to render, false if not.

True if the model is allowed to update, false if not.

ID that represents the model. If this is null then the model is unnamed and can't be specificly requested from a manager.

Stores the model properties.

3D object.


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