|
RigsofRods
Soft-body Physics Simulation
|
Go to the documentation of this file.
38 #include <OgreAxisAlignedBox.h>
39 #include <OgreColourValue.h>
40 #include <OgreMaterial.h>
41 #include <OgreQuaternion.h>
42 #include <OgreTexture.h>
43 #include <OgreVector3.h>
74 void ScaleActor(Ogre::Vector3 relpos,
float ratio);
155 static Ogre::Quaternion
SpecialGetRotationTo(
const Ogre::Vector3& src,
const Ogre::Vector3& dest);
void SetDebugView(DebugViewType dv)
std::vector< NodeGfx > m_gfx_nodes
void RemoveBeam(int beam_index)
GfxActor(ActorPtr actor, ActorSpawner *spawner, std::string ogre_resource_group, RoR::Renderdash *renderdash)
Global forward declarations.
size_t getNumVideoCameras() const
void UpdateSimDataBuffer()
Copies sim. data from Actor to GfxActor for later update.
SurveyMapEntity m_surveymap_entity
Ogre::Entity * m_cab_entity
void CalculateDriverPos(Ogre::Vector3 &out_pos, Ogre::Quaternion &out_rot)
float m_prop_anim_crankfactor_prev
bool HasDriverSeatProp() const
void SetFlexbodyVisible(bool visible)
std::vector< VideoCamera > m_videocameras
NodeSB * GetSimNodeBuffer()
Ogre::SceneNode * m_cab_scene_node
void RegisterCabMaterial(Ogre::MaterialPtr mat, Ogre::MaterialPtr mat_trans)
int countBeaconProps() const
DustPool * m_particles_drip
int m_prop_anim_prev_gear
A visual mesh, forming a chassis for softbody actor At most one instance is created per actor.
void FinishFlexbodyTasks()
std::vector< FlareMaterial > m_flare_materials
void SetVideoCamState(VideoCamState state)
SurveyMapEntity & getSurveyMapEntity()
void SetNodeHot(NodeNum_t nodenum, bool value)
Processes a RigDef::Document (parsed from 'truck' file format) into a simulated gameplay object (Acto...
Ogre::MaterialPtr GetHelpMat()
int m_driverseat_prop_index
void FinishWheelUpdates()
void UpdateParticles(float dt_sec)
void UpdatePropAnimations(float dt)
Ogre::MaterialPtr m_cab_mat_visual_trans
VideoCamState GetVideoCamState() const
void UpdateProps(float dt, bool is_player_actor)
Ogre::MaterialPtr m_help_mat
std::vector< FlexBody * > m_flexbodies
Ogre::SceneNode * m_gfx_beams_parent_scenenode
DebugViewType m_debug_view
uint16_t NodeNum_t
Node position within Actor::ar_nodes; use RoR::NODENUM_INVALID as empty value.
void UpdateRenderdashRTT()
Ogre::TexturePtr GetHelpTex()
float UpdateSmoothShift(PropAnim &anim, float dt, float new_target_cstate)
int GetActorState() const
void SetCabLightsActive(bool state_on)
void SetWheelsVisible(bool value)
VideoCamState m_vidcam_state
int WheelID_t
Index to Actor::ar_wheels, use RoR::WHEELID_INVALID as empty value.
Ogre::MaterialPtr m_cab_mat_template_plain
void SetWingsVisible(bool visible)
void SetRodsVisible(bool visible)
void UpdateVideoCameras(float dt_sec)
void SetFlexbodiesVisible(bool visible)
std::string m_custom_resource_group
A mesh attached to vehicle frame via 3 nodes.
std::vector< WheelGfx > m_wheels
DustPool * m_particles_dust
'renderdash' is a name of a classic Render-To-Texture animated material with gauges and other dashboa...
void ScaleActor(Ogre::Vector3 relpos, float ratio)
DustPool * m_particles_clump
static Ogre::Quaternion SpecialGetRotationTo(const Ogre::Vector3 &src, const Ogre::Vector3 &dest)
bool m_beaconlight_active
std::string getWheelRimMeshName(WheelID_t wheel_id)
float m_prop_anim_shift_timer
void RegisterCabMesh(Ogre::Entity *ent, Ogre::SceneNode *snode, FlexObj *flexobj)
Ogre::TexturePtr m_help_tex
std::vector< FlexBody * > & GetFlexbodies()
void SetAeroEnginesVisible(bool visible)
Ogre::MaterialPtr m_cab_mat_visual
Updated in-place from templates.
DebugViewType m_last_debug_view
void SetCastShadows(bool value)
void SetBeaconsEnabled(bool beacon_light_is_active)
std::vector< Prop > & getProps()
void SetRenderdashActive(bool active)
bool IsActorLive() const
Should the visuals be updated for this actor?
std::vector< std::shared_ptr< Task > > m_flexwheel_tasks
void CalcPropAnimation(PropAnim &anim, float &cstate, int &div, float dt)
DustPool * m_particles_sparks
void SetMaterialFlareOn(int flare_index, bool state_on)
void UpdateBeaconFlare(Prop &prop, float dt, bool is_player_actor)
DebugViewType GetDebugView() const
WheelSide
Used by rig-def/addonpart/tuneup formats to specify wheel rim mesh orientation.
std::vector< NodeSB > simbuf_nodes
void UpdateFlares(float dt_sec, bool is_player)
void SetAllMeshesVisible(bool value)
DustPool * m_particles_ripple
std::vector< BeamGfx > m_gfx_beams
void UpdateWheelVisuals()
void UpdateNetLabels(float dt)
Ogre::String GetResourceGroup()
const ActorPtr & getOwningActor()
ActorSB & GetSimDataBuffer()
DustPool * m_particles_splash
std::vector< AirbrakeGfx > m_gfx_airbrakes
Ogre::MaterialPtr & GetCabTransMaterial()
WheelSide getWheelSide(WheelID_t wheel_id)
std::vector< std::shared_ptr< Task > > m_flexbody_tasks
Ogre::MaterialPtr m_cab_mat_template_emissive
void SetPropsVisible(bool visible)
std::vector< Prop > m_props
RoR::Renderdash * m_renderdash