|
|
@@ -883,12 +883,6 @@ static CScriptArray* OctreeGetDrawablesSphere(const Sphere& sphere, unsigned cha
|
|
|
return VectorToHandleArray<Drawable>(result, "Array<Node@>");
|
|
|
}
|
|
|
|
|
|
-static void OctreeAddDrawable(Drawable* drawable, Octree* ptr)
|
|
|
-{
|
|
|
- if (drawable && !drawable->GetOctant())
|
|
|
- ptr->AddDrawable(drawable);
|
|
|
-}
|
|
|
-
|
|
|
static Octree* SceneGetOctree(Scene* ptr)
|
|
|
{
|
|
|
return ptr->GetComponent<Octree>();
|
|
|
@@ -918,9 +912,8 @@ static void RegisterOctree(asIScriptEngine* engine)
|
|
|
RegisterComponent<Octree>(engine, "Octree");
|
|
|
engine->RegisterObjectMethod("Octree", "void Resize(const BoundingBox&in, uint)", asMETHOD(Octree, Resize), asCALL_THISCALL);
|
|
|
engine->RegisterObjectMethod("Octree", "void DrawDebugGeometry(bool) const", asMETHOD(Octree, DrawDebugGeometry), asCALL_THISCALL);
|
|
|
- engine->RegisterObjectMethod("Octree", "void AddDrawable(Drawable@+)", asFUNCTION(OctreeAddDrawable), asCALL_CDECL_OBJLAST);
|
|
|
- engine->RegisterObjectMethod("Octree", "void AddUnculledDrawable(Drawable@+)", asMETHOD(Octree, AddUnculledDrawable), asCALL_THISCALL);
|
|
|
- engine->RegisterObjectMethod("Octree", "void RemoveUnculledDrawable(Drawable@+)", asMETHOD(Octree, RemoveUnculledDrawable), asCALL_THISCALL);
|
|
|
+ engine->RegisterObjectMethod("Octree", "void AddManualDrawable(Drawable@+, bool)", asMETHOD(Octree, AddManualDrawable), asCALL_THISCALL);
|
|
|
+ engine->RegisterObjectMethod("Octree", "void RemoveManualDrawable(Drawable@+)", asMETHOD(Octree, RemoveManualDrawable), asCALL_THISCALL);
|
|
|
engine->RegisterObjectMethod("Octree", "Array<RayQueryResult>@ Raycast(const Ray&in, RayQueryLevel level = RAY_TRIANGLE, float maxDistance = M_INFINITY, uint8 drawableFlags = DRAWABLE_ANY, uint viewMask = DEFAULT_VIEWMASK)", asFUNCTION(OctreeRaycast), asCALL_CDECL_OBJLAST);
|
|
|
engine->RegisterObjectMethod("Octree", "Array<Node@>@ GetDrawables(const Vector3&in, uint8 drawableFlags = DRAWABLE_ANY, uint viewMask = DEFAULT_VIEWMASK)", asFUNCTION(OctreeGetDrawablesPoint), asCALL_CDECL_OBJLAST);
|
|
|
engine->RegisterObjectMethod("Octree", "Array<Node@>@ GetDrawables(const BoundingBox&in, uint8 drawableFlags = DRAWABLE_ANY, uint viewMask = DEFAULT_VIEWMASK)", asFUNCTION(OctreeGetDrawablesBox), asCALL_CDECL_OBJLAST);
|