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 () |
kVec3 & | Offset () |
const int | GetNumNodes () const |
kVec3 | GetNodeOrigin (const int node, const kVec3 &in offset) |
Is calculated on draw. Can call ForceUpdateJoints if you need the current value for interpolation. | |
kQuat | GetNodeRotation (const int node) |
Is calculated on draw. Can call ForceUpdateJoints if you need the current value for interpolation. | |
kVec3 | GetNodeScale (const int node) |
void | ForceUpdateJoints (const float interpolatedFraction=1.0f) |
Force update node matrices and then call GetNodeOrigin/GetNodeRotation to get current value. interpolatedFraction should be in the range 0.0 (prev) to 1.0 (current). This is an expensive operation so use sparingly. | |
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) |
void | ColorOverride (const int node, const float r=1.0f, const float g=1.0f, const float b=1.0f, const float a=1.0f) |
void | ColorOverrideSections (const int node, const int sectionMask=-1) |
enable the color override for specific sections(materials) on the node by setting each bit. -1 = All, 0 = Stop override | |
Definition at line 943 of file t1_scriptAPI.cpp.
void kRenderModel::AddTrailEffect | ( | const kStr &in | trailName, |
const int | nodeIndex ) |
void kRenderModel::ColorOverride | ( | const int | node, |
const float | r = 1.0f, | ||
const float | g = 1.0f, | ||
const float | b = 1.0f, | ||
const float | a = 1.0f ) |
void kRenderModel::ColorOverrideSections | ( | const int | node, |
const int | sectionMask = -1 ) |
enable the color override for specific sections(materials) on the node by setting each bit. -1 = All, 0 = Stop override
void kRenderModel::ForceUpdateJoints | ( | const float | interpolatedFraction = 1.0f | ) |
Force update node matrices and then call GetNodeOrigin/GetNodeRotation to get current value. interpolatedFraction should be in the range 0.0 (prev) to 1.0 (current). This is an expensive operation so use sparingly.
kStr kRenderModel::GetAnimFile | ( | ) | const |
kStr kRenderModel::GetModelFile | ( | ) | const |
void kRenderModel::GetMorphFrame | ( | int &out | frame, |
int &out | nextFrame, | ||
int &out | maxFrames, | ||
float &out | time ) const |
Get Morph frame info.
frame | 1=Init Frame, 2=Start Loop Frame. >= maxFrames then 1. |
nextFrame | 2=Init Frame, 3=Start Loop Frame. >= maxFrames then 2. |
maxFrames | |
time | 0..1 (lerp time between frame and nextFrame meshes) |
Is calculated on draw. Can call ForceUpdateJoints if you need the current value for interpolation.
kQuat kRenderModel::GetNodeRotation | ( | const int | node | ) |
Is calculated on draw. Can call ForceUpdateJoints if you need the current value for interpolation.
kVec3 kRenderModel::GetNodeScale | ( | const int | node | ) |
const int kRenderModel::GetNumAttachedTrails | ( | ) |
const int kRenderModel::GetNumNodes | ( | ) | const |
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.
const bool kRenderModel::IsMorph | ( | ) | const |
kVec3 & kRenderModel::Offset | ( | ) |
void kRenderModel::RemoveTrailEffect | ( | ) |
Removes all trail effects.
void kRenderModel::SetMorphFrame | ( | const int | frame, |
const int | nextFrame, | ||
const float | time ) |
void kRenderModel::SetMorphUpdating | ( | const bool | bUpdate | ) |
Set Morph Updating.
bUpdate | Set to false to handle updating it yourself per ModelFile (not per Actor). |
Default Tick code:
void kRenderModel::SetRotationOffset | ( | const int | nodeIndex, |
const float | rads, | ||
const float | x, | ||
const float | y, | ||
const float | z ) |
void kRenderModel::SetRotationOffset | ( | const int | nodeIndex, |
const kQuat &in | rotation ) |
void kRenderModel::SetTexture | ( | const int | section, |
const int | textureID ) |
void kRenderModel::SetVisibility | ( | const int | nodeIndex, |
const bool | visible ) |