Cafu Engine
ComponentModelT Class Reference

This component adds a 3D model to its window. More...

Inheritance diagram for ComponentModelT:

Public Member Functions

number GetNumAnims ()
 Returns the number of animation sequences in this model. More...
 
number SetAnim (number anim, number blend_time=0.0, boolean force_loop=false)
 Sets a new animation sequence for the pose of this model. More...
 
number GetNumSkins ()
 Returns the number of skins in this model. More...
 
- Public Member Functions inherited from ComponentBaseT
any get (string var_name)
 Returns the value of an attribute (a member variable) of this class. More...
 
 set (string var_name, any new_value)
 Sets an attribute (a member variable) of this class to a new value. More...
 
string GetExtraMessage (string var_name)
 Returns the result of VarBaseT::GetExtraMessage() for the given member variable. More...
 
 interpolate (string var_name, number start_value, number end_value, number time)
 Schedules a value for interpolation between a start and end value over a given period of time. More...
 

Public Attributes

string Name
 The file name of the model. More...
 
number Animation
 The animation sequence number of the model. More...
 
number Skin
 The skin used for rendering the model. More...
 
tuple Pos
 The position of the model in world space. More...
 
number Scale
 The scale factor applied to the model coordinates when converted to world space. More...
 
tuple Angles
 The angles around the axes that determine the orientation of the model in world space. More...
 
tuple CameraPos
 The position of the camera in world space. More...
 

Detailed Description

This component adds a 3D model to its window.

Note that the variables of this class (also referred to as "Public Attributes" or "Member Data") must be used with the get() and set() methods at this time – see get() and set() for details.

If you would like to create a new component of this type explicitly (those defined in the CaWE GUI Editor are instantiated automatically), use GuiT::new():

local comp = gui:new("ComponentModelT")
Implementing C++ Class:
cf::GuiSys::ComponentModelT

Member Function Documentation

number GetNumAnims ( )

Returns the number of animation sequences in this model.

number GetNumSkins ( )

Returns the number of skins in this model.

number SetAnim ( number  anim,
number  blend_time = 0.0,
boolean  force_loop = false 
)

Sets a new animation sequence for the pose of this model.

Optionally, there is a blending from the previous sequence over a given time. Also optionally, the "force loop" flag for the new sequence can be set. For example: SetAnim(8, 3.0, true)

Member Data Documentation

tuple Angles

The angles around the axes that determine the orientation of the model in world space.

Related C++ type:
Vector3fT
number Animation

The animation sequence number of the model.

Related C++ type:
int
tuple CameraPos

The position of the camera in world space.

Related C++ type:
Vector3fT
string Name

The file name of the model.

Related C++ type:
std::string
tuple Pos

The position of the model in world space.

Related C++ type:
Vector3fT
number Scale

The scale factor applied to the model coordinates when converted to world space.

Related C++ type:
float
number Skin

The skin used for rendering the model.

Related C++ type:
int