Vehicle Actor WIP
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
#define RC_SCENE_H_INCLUDED
|
||||
|
||||
#include "rc_gfx_core.h"
|
||||
#include "rc_base_actor.h"
|
||||
#include "rc_constraint.h"
|
||||
|
||||
void rc_addSceneSkyBox(int img_top, int img_bottom, int img_left, int img_right, int img_front, int img_back)
|
||||
{
|
||||
@@ -78,35 +80,14 @@ void rc_clearScene()
|
||||
{
|
||||
for(int i = 0; i < rc_physics3D.constraints.size(); i++)
|
||||
{
|
||||
if(rc_physics3D.constraints[i].constraint)
|
||||
{
|
||||
rc_physics3D.world->getPointer()->removeConstraint(rc_physics3D.constraints[i].constraint);
|
||||
rc_physics3D.constraints[i].constraint = NULL;
|
||||
rc_physics3D.constraints[i].type = 0;
|
||||
}
|
||||
rc_deleteConstraint(i);
|
||||
}
|
||||
|
||||
rc_projector_actors.clear();
|
||||
|
||||
for(int i = 0; i < rc_actor.size(); i++)
|
||||
{
|
||||
if(rc_actor[i].mesh_node)
|
||||
{
|
||||
if(rc_actor[i].physics.rigid_body)
|
||||
rc_physics3D.world->removeCollisionObject(rc_actor[i].physics.rigid_body, false);
|
||||
|
||||
rc_actor[i].physics.rigid_body = NULL;
|
||||
|
||||
rc_actor[i].physics.collisions.clear();
|
||||
|
||||
rc_actor[i].mesh_node->remove();
|
||||
rc_actor[i].mesh_node = NULL;
|
||||
rc_actor[i].shadow = NULL;
|
||||
rc_actor[i].node_type = 0;
|
||||
rc_actor[i].transition = false;
|
||||
rc_actor[i].transition_time = 0;
|
||||
rc_actor[i].material_ref_index = -1;
|
||||
}
|
||||
rc_deleteActor(i);
|
||||
}
|
||||
|
||||
rc_removeSceneSky();
|
||||
|
||||
Reference in New Issue
Block a user