Esempio n. 1
0
GameObjectModel* GameObjectModel::construct(const GameObject* const pGo)
{
    const GameObjectDisplayInfoEntry* info = sGameObjectDisplayInfoStore.LookupEntry(pGo->GetDisplayId());
    if (!info)
        return NULL;

    GameObjectModel* mdl = new GameObjectModel();
    if (!mdl->initialize(pGo, info))
    {
        delete mdl;
        return NULL;
    }

    return mdl;
}
GameObjectModel* GameObjectModel::Create(const GameObject& go)
{
    const GameObjectDisplayInfoEntry* info = sGameObjectDisplayInfoStore.LookupEntry(go.GetDisplayId());
    if (!info)
        return NULL;

    GameObjectModel* mdl = new GameObjectModel();
    if (!mdl->initialize(go, *info))
    {
        delete mdl;
        return NULL;
    }

    return mdl;
}
Esempio n. 3
0
 bool operator()(const G3D::Ray& r, const GameObjectModel& obj, float& distance)
 {
     TC_LOG_DEBUG("maps", "testing intersection with %s", obj.name.c_str());
     bool hit = obj.intersectRay(r, distance, true, phase_mask);
     if (hit)
     {
         did_hit = true;
         TC_LOG_DEBUG("maps", "result: intersects");
     }
     return hit;
 }
Esempio n. 4
0
 bool operator()(const G3D::Ray& r, const GameObjectModel& obj, float& distance)
 {
     LogDebug("DynamicTreeIntersectionCallback_WithLogger : testing intersection with %s", obj.name.c_str());
     bool hit = obj.intersectRay(r, distance, true, phase_mask);
     if (hit)
     {
         did_hit = true;
         LogDebug("DynamicTreeIntersectionCallback_WithLogger : result: intersects");
     }
     return hit;
 }
Esempio n. 5
0
 bool operator()(const Ray& r, const GameObjectModel& obj, float& distance)
 {
     DEBUG_LOG("testing intersection with %s", obj.name.c_str());
     bool hit = obj.intersectRay(r, distance, true);
     if (hit)
     {
         did_hit = true;
         DEBUG_LOG("result: intersects");
     }
     return hit;
 }
Esempio n. 6
0
 bool operator()(const Ray& r, const GameObjectModel& obj, float& distance)
 {
     sLog->outDebug(LOG_FILTER_MAPS, "testing intersection with %s", obj.name.c_str());
     bool hit = obj.intersectRay(r, distance, true, phase_mask);
     if (hit)
     {
         did_hit = true;
         sLog->outDebug(LOG_FILTER_MAPS, "result: intersects");
     }
     return hit;
 }
Esempio n. 7
0
 static void getBounds(const GameObjectModel& g, G3D::AABox& out) { out = g.getBounds();}
Esempio n. 8
0
 static void getPosition(const GameObjectModel& g, G3D::Vector3& p) { p = g.getPosition(); }
Esempio n. 9
0
 bool operator()(const G3D::Ray& r, const GameObjectModel& obj, float& distance)
 {
     did_hit = obj.intersectRay(r, distance, true, phase_mask);
     return did_hit;
 }
Esempio n. 10
0
 void operator()(G3D::Vector3 const& p, GameObjectModel const& obj)
 {
     obj.intersectPoint(p, _areaInfo, _phaseShift);
 }
Esempio n. 11
0
 bool operator()(G3D::Ray const& r, GameObjectModel const& obj, float& distance)
 {
     _didHit = obj.intersectRay(r, distance, true, _phaseShift);
     return _didHit;
 }