details :
the program is an object creator / editor (not a scene node editor, but an object editor) that uses a unique editing style. The objects all reside in DLL's and are similar to COM objects. I dont want to get wordy here, but the editor supports translation, scale, physics, sound, graphics editing in game, including any object specific variables. Example, the CSObject_Light is a fully editable light object. The CSObject_Item is a fully editable AnimatedSceneNode object, and the CSObject_CampFire looks like this...
Code: Select all
class CSObject_CampFire : public CSObject
{
public:
// declare the persistent variables
int m_Fire;
int m_Light;
ADD_VARIABLE_GET(bool,m_Active,Active,StringToBool,BoolToString);
CSObject_CampFire::CSObject_CampFire() { Initialize(); }
virtual CSObject_CampFire::~CSObject_CampFire() { Cleanup(); }
virtual void Initialize()
{
// begin the state machine
CSStateMachine::Initialize();
CS_INIT(m_Fire);
CS_INIT(m_Light);
}
virtual bool Create(CSLevel* level)
{
CSObject::Create(level);
// this is important for saving and loading the level
m_Info->SetName("CSObject_CampFire");
SetName("CSObject_CampFire");
LoadAnimatedSceneNode("media/campfire.x");
CreateNXActor();
m_Fire = m_Level->CreateObjectByType("CSObject_ParticleSystem");
CSObject* o = m_Level->GetFactory()->GetObjectPointer(m_Fire);
if (o)
{
o->SetDebugObject(true);
o->SetPosition(GetPosition());
o->SetVariable("FileName","media\\fire.bmp");
o->SetVariable("Emitter_Box", Vector3dfToString(vector3df(10,10,10)));
o->SetVariable("Emitter_Direction", Vector3dfToString(vector3df(0,0.03f,0)));
o->SetVariable("EmitterMinParticlesPerSecond", FloatToString(50));
o->SetVariable("EmitterMaxParticlesPerSecond", FloatToString(100));
o->SetVariable("EmitterMinStartColor", SColorToString(SColor(0,255,255,255)));
o->SetVariable("EmitterMaxStartColor", SColorToString(SColor(0,255,255,255)));
o->SetVariable("EmitterLifeTimeMin", FloatToString(200));
o->SetVariable("EmitterLifeTimeMax", FloatToString(400));
o->SetVariable("EmitterMaxAngleDegrees",IntToString(0));
}
m_Light = m_Level->CreateObjectByType("CSObject_Light");
o = m_Level->GetFactory()->GetObjectPointer(m_Light);
if (o)
{
o->SetDebugObject(true);
o->SetPosition(GetPosition());
o->SetVariable("Radius",FloatToString(300));
}
SetSoundFileName("media//Sound//Fire.wav");
SetObjectType(CS_TYPE_OBJECT);
return true;
}
virtual void CreateNXActor()
{
RemoveNXActor();
// create a PhysX model for it
if (m_AnimatedSceneNode)
{
m_AnimatedSceneNode->getMesh()->getMesh(0)->getMeshBuffer(0)->recalculateBoundingBox();
vector3df dims( (m_AnimatedSceneNode->getBoundingBox().MaxEdge * GetScale() - GetBBOffset()) - (m_AnimatedSceneNode->getBoundingBox().MinEdge * GetScale() + GetBBOffset()));
m_PhysicsActor = m_Level->m_App->GetPhysics()->CreateRigidBox(m_Level->GetPhysicsScene(),GetPosition(),GetRotation(),dims,true);
}
}
virtual void SetDead(bool value)
{
CSObject::SetDead(value);
CSObject* o = m_Level->GetFactory()->GetObjectPointer(m_Fire);
if (o) o->SetDead(true);
o = m_Level->GetFactory()->GetObjectPointer(m_Light);
if (o) o->SetDead(true);
}
virtual void SetScale(vector3df scale)
{
CSObject::SetScale(scale);
CSObject* o = m_Level->GetFactory()->GetObjectPointer(m_Fire);
if (o) o->SetScale(GetScale());
o = m_Level->GetFactory()->GetObjectPointer(m_Light);
if (o) o->SetScale(GetScale());
}
virtual void SetRotation(vector3df rot)
{
CSObject::SetRotation(rot);
if (m_AnimatedSceneNode) m_AnimatedSceneNode->setRotation(rot);
}
virtual void SetPosition(vector3df pos)
{
CSObject::SetPosition(pos);
CSObject* o = m_Level->GetFactory()->GetObjectPointer(m_Fire);
if (o) o->SetPosition(GetPosition());
o = m_Level->GetFactory()->GetObjectPointer(m_Light);
if (o) o->SetPosition(vector3df(GetPosition().X,GetPosition().Y+80,GetPosition().Z));
}
virtual void Frame()
{
CSObject::Frame();
CSObject* o = m_Level->GetFactory()->GetObjectPointer(m_Fire);
if (o) o->SetPosition(vector3df(GetPosition().X,GetPosition().Y + 20,GetPosition().Z) + GetPositionOffset());
o = m_Level->GetFactory()->GetObjectPointer(m_Light);
if (o) o->SetPosition(vector3df(GetPosition().X,GetPosition().Y+80,GetPosition().Z)+ GetPositionOffset());
}
};
when the campfire is moved, scaled, rotated etc.., all of the objects attached to it are also. In this example, the light and the fire.
Uses the following libraries :
IrrLicht
IrrKlang
Physx
anyhow. the point of this posting is to see if there is any interest in running the app a little bit and feeding back to me what you see, hear, think. You will need the PhysX driver installed to run it.
Anyone interested please Private Message me and I will set up a download link for you.
Thanks for listening.......
fade back to black..............