Turok
 
Loading...
Searching...
No Matches
kRenderModel Class Reference

Public Member Functions

void SetModel (const kStr &in modelPath, const kStr &in modelAnimPath)
 
void SetRotationOffset (const int nodeIndex, const float rads, const float x, const float y, const float z)
 
void SetRotationOffset (const int nodeIndex, const kQuat &in rotation)
 
void SetTexture (const int section, const int textureID)
 
void SetVisibility (const int nodeIndex, const bool visible)
 
void HideSection (const int nodeIndex, const int section, const bool hide)
 section is the surface index. must be 0-31 and must not be >= number of surfaces or will do nothing.
 
void AddTrailEffect (const kStr &in trailName, const int nodeIndex)
 
void RemoveTrailEffect ()
 Removes all trail effects.
 
const int GetNumAttachedTrails ()
 
kVec3Offset ()
 
const int GetNumNodes () const
 
kVec3 GetNodeOrigin (const int node, const kVec3 &in offset)
 
kQuat GetNodeRotation (const int node)
 
kVec3 GetNodeScale (const int node)
 
kStr GetModelFile () const
 
kStr GetAnimFile () const
 
const bool IsMorph () const
 
void SetMorphUpdating (const bool bUpdate)
 Set Morph Updating.
 
void GetMorphFrame (int &out frame, int &out nextFrame, int &out maxFrames, float &out time) const
 Get Morph frame info.
 
void SetMorphFrame (const int frame, const int nextFrame, const float time)
 

Detailed Description

Definition at line 943 of file t1_scriptAPI.cpp.

Member Function Documentation

◆ AddTrailEffect()

void kRenderModel::AddTrailEffect ( const kStr &in trailName,
const int nodeIndex )

◆ GetAnimFile()

kStr kRenderModel::GetAnimFile ( ) const

◆ GetModelFile()

kStr kRenderModel::GetModelFile ( ) const

◆ GetMorphFrame()

void kRenderModel::GetMorphFrame ( int &out frame,
int &out nextFrame,
int &out maxFrames,
float &out time ) const

Get Morph frame info.

Parameters
frame1=Init Frame, 2=Start Loop Frame. >= maxFrames then 1.
nextFrame2=Init Frame, 3=Start Loop Frame. >= maxFrames then 2.
maxFrames
time0..1 (lerp time between frame and nextFrame meshes)

◆ GetNodeOrigin()

kVec3 kRenderModel::GetNodeOrigin ( const int node,
const kVec3 &in offset )

◆ GetNodeRotation()

kQuat kRenderModel::GetNodeRotation ( const int node)

◆ GetNodeScale()

kVec3 kRenderModel::GetNodeScale ( const int node)

◆ GetNumAttachedTrails()

const int kRenderModel::GetNumAttachedTrails ( )

◆ GetNumNodes()

const int kRenderModel::GetNumNodes ( ) const

◆ HideSection()

void kRenderModel::HideSection ( const int nodeIndex,
const int section,
const bool hide )

section is the surface index. must be 0-31 and must not be >= number of surfaces or will do nothing.

◆ IsMorph()

const bool kRenderModel::IsMorph ( ) const

◆ Offset()

kVec3 & kRenderModel::Offset ( )

◆ RemoveTrailEffect()

void kRenderModel::RemoveTrailEffect ( )

Removes all trail effects.

◆ SetModel()

void kRenderModel::SetModel ( const kStr &in modelPath,
const kStr &in modelAnimPath )

◆ SetMorphFrame()

void kRenderModel::SetMorphFrame ( const int frame,
const int nextFrame,
const float time )

◆ SetMorphUpdating()

void kRenderModel::SetMorphUpdating ( const bool bUpdate)

Set Morph Updating.

Parameters
bUpdateSet to false to handle updating it yourself per ModelFile (not per Actor).

Default Tick code:

if(time >= 1.0f)
{
time = 0;
frame++;
if(frame >= maxFrames)
{
frame = 2;
}
nextFrame = frame + 1;
}
time += GAME_DELTA_TIME * 7.5f;
const float GAME_DELTA_TIME

◆ SetRotationOffset() [1/2]

void kRenderModel::SetRotationOffset ( const int nodeIndex,
const float rads,
const float x,
const float y,
const float z )

◆ SetRotationOffset() [2/2]

void kRenderModel::SetRotationOffset ( const int nodeIndex,
const kQuat &in rotation )

◆ SetTexture()

void kRenderModel::SetTexture ( const int section,
const int textureID )

◆ SetVisibility()

void kRenderModel::SetVisibility ( const int nodeIndex,
const bool visible )