|
virtual std::string | GetTypeName () const override |
|
virtual void | SetID (uint32_t newID) override |
|
virtual void | SetName (std::string newName) override |
|
| WObject (Wasabi *const app, uint32_t ID=0) |
|
| WObject (Wasabi *const app, class WEffect *fx, uint32_t bindingSet, uint32_t ID=0) |
|
bool | WillRender (class WRenderTarget *rt) |
|
void | Render (class WRenderTarget *rt, class WMaterial *material, bool updateInstances=true) |
|
WError | SetGeometry (class WGeometry *geometry) |
|
WError | SetAnimation (class WAnimation *animation) |
|
class WGeometry * | GetGeometry () const |
|
class WAnimation * | GetAnimation () const |
|
WError | InitInstancing (uint32_t maxInstances) |
|
void | DestroyInstancingResources () |
|
WInstance * | CreateInstance () |
|
WInstance * | GetInstance (uint32_t index) const |
|
void | DeleteInstance (WInstance *instance) |
|
void | DeleteInstance (uint32_t index) |
|
uint32_t | GetInstancesCount () const |
|
void | Show () |
|
void | Hide () |
|
bool | Hidden () const |
|
void | EnableFrustumCulling () |
|
void | DisableFrustumCulling () |
|
bool | InCameraView (class WCamera *cam) |
|
void | Scale (WVector3 scale) |
|
WVector3 | GetScale () const |
|
WMatrix | GetWorldMatrix () |
|
bool | UpdateLocals () |
|
virtual void | OnStateChange (STATE_CHANGE_TYPE type) override |
|
virtual bool | Valid () const override |
|
virtual WError | SaveToStream (WFile *file, std::ostream &outputStream) override |
|
virtual WError | LoadFromStream (WFile *file, std::istream &inputStream, std::vector< void * > &args, std::string nameSuffix) override |
|
void | SetPosition (float x, float y, float z) |
|
void | SetPosition (const WVector3 pos) |
|
void | Point (float x, float y, float z) |
|
void | Point (WVector3 target) |
|
void | SetAngle (WQuaternion quat) |
|
void | SetToRotation (const WOrientation *const device) |
|
void | SetULRVectors (WVector3 up, WVector3 look, WVector3 right) |
|
void | SetToTransformation (WMatrix mtx) |
|
void | Yaw (float angle) |
|
void | Roll (float angle) |
|
void | Pitch (float angle) |
|
void | Move (float units) |
|
void | Strafe (float units) |
|
void | Fly (float units) |
|
float | GetPositionX () const |
|
float | GetPositionY () const |
|
float | GetPositionZ () const |
|
WVector3 | GetPosition () const |
|
float | GetAngleX () const |
|
float | GetAngleY () const |
|
float | GetAngleZ () const |
|
WQuaternion | GetRotation () const |
|
WVector3 | GetUVector () const |
|
WVector3 | GetLVector () const |
|
WVector3 | GetRVector () const |
|
virtual void | SetBindingMatrix (WMatrix mtx) |
|
void | RemoveBinding () |
|
WMatrix | GetBindingMatrix () const |
|
bool | IsBound () const |
|
WMatrix | ComputeTransformation () const |
|
WMatrix | ComputeInverseTransformation () const |
|
| WFileAsset (class Wasabi *const app, uint32_t ID=0) |
|
virtual WError | LoadFromStream (class WFile *file, std::istream &inputStream, vector< void * > &args, std::string nameSuffix)=0 |
|
| WBase (class Wasabi *const app, uint32_t ID=0) |
|
uint32_t | GetID () const |
|
std::string | GetName () const |
|
class Wasabi * | GetAppPtr () const |
|
void | AddReference () |
|
void | RemoveReference () |
|
void | AddEffect (class WEffect *effect, uint32_t bindingSet=0) |
|
void | RemoveEffect (class WEffect *effect) |
|
void | RemoveEffect (class WMaterial *material) |
|
void | ClearEffects () |
|
class WMaterial * | GetMaterial (class WEffect *effect) |
|
class WMaterialCollection & | GetMaterials () |
|
A WObject provides an easy way to render things in Wasabi. A WObject combines WGeometry and WMaterial to render geometry using the material. Furthermore, WObject provides an interface to manipulate the rendered object's desired position, orientation and scale. A WObject also provides an easy way to apply animations and instancing on rendered geometry.
Renders this object. An object will only render to the render target if its valid (see Valid()) and not hidden (see Hide()). If frustum culling is enabled (see EnableFrustumCulling()), the object will only render if it is within the viewing frustum of the render target's camera. Before an object binds the provided material (WMaterial::Bind()), it will set the following variables and resources in the material, if they exist:
- "worldMatrix" (WMatrix) will be set to the world matrix of this object.
- "isInstanced" (int) will be set to 1 if instancing data is available, 0 otherwise.
- texture "animationTexture" will be assigned to the animation texture from the attached animation. This will only occur if the object's material is rigged and there is an animation supplied.
- texture "instancingTexture" will be assigned to the instancing texture created by this object. This will only occur if isInstanced was set to 1.
If the object's instancing is initiated (see InitInstancing()), and there is at least one instance created (see CreateInstance()), the object will be rendered using geometry instancing.
- Parameters
-
rt | Render target to render to. |
material | Material to fill in with object data and bind |
updateInstances | Whether or not to update the instances data |