mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
Recast: rename shape volume methods
Reflect new changes, which supports more than only convex shapes.
This commit is contained in:
parent
fa1db8f995
commit
0298591068
@ -779,7 +779,7 @@ int InputGeom::addConvexVolume(const float* verts, const int nverts,
|
||||
return m_volumeCount-1;
|
||||
}
|
||||
|
||||
void InputGeom::deleteConvexVolume(int i)
|
||||
void InputGeom::deleteShapeVolume(int i)
|
||||
{
|
||||
m_volumeCount--;
|
||||
m_volumes[i] = m_volumes[m_volumeCount];
|
||||
|
@ -78,7 +78,7 @@ static int convexhull(const float* pts, int npts, int* out)
|
||||
|
||||
static bool isValidVolumeIndex(const int index, const InputGeom* geom)
|
||||
{
|
||||
return index > -1 && index < geom->getConvexVolumeCount();
|
||||
return index > -1 && index < geom->getShapeVolumeCount();
|
||||
}
|
||||
|
||||
void handleVolumeFlags(int& flags, const char* buttonId)
|
||||
@ -233,7 +233,7 @@ void ShapeVolumeTool::handleMenu()
|
||||
ImGui::Separator();
|
||||
ImGui::Text("Modify Shape");
|
||||
|
||||
ShapeVolume& vol = geom->getConvexVolumes()[m_selectedVolumeIndex];
|
||||
ShapeVolume& vol = geom->getShapeVolumes()[m_selectedVolumeIndex];
|
||||
|
||||
if (m_selectedVolumeIndex != m_copiedShapeIndex)
|
||||
{
|
||||
@ -330,7 +330,7 @@ void ShapeVolumeTool::handleMenu()
|
||||
|
||||
if (ImGui::Button("Delete Shape##ShapeVolumeModify"))
|
||||
{
|
||||
geom->deleteConvexVolume(m_selectedVolumeIndex);
|
||||
geom->deleteShapeVolume(m_selectedVolumeIndex);
|
||||
m_selectedVolumeIndex = -1;
|
||||
|
||||
return;
|
||||
|
@ -189,15 +189,15 @@ public:
|
||||
|
||||
/// @name Shape Volumes.
|
||||
///@{
|
||||
int getConvexVolumeCount() const { return m_volumeCount; } // todo(amos): rename to 'getShapeVolumeCount'
|
||||
ShapeVolume* getConvexVolumes() { return m_volumes; } // todo(amos): rename to 'getShapeVolumes'
|
||||
int getShapeVolumeCount() const { return m_volumeCount; } // todo(amos): rename to 'getShapeVolumeCount'
|
||||
ShapeVolume* getShapeVolumes() { return m_volumes; } // todo(amos): rename to 'getShapeVolumes'
|
||||
int addBoxVolume(const float* bmin, const float* bmax,
|
||||
unsigned short flags, unsigned char area);
|
||||
int addCylinderVolume(const float* pos, const float radius,
|
||||
const float height, unsigned short flags, unsigned char area);
|
||||
int addConvexVolume(const float* verts, const int nverts,
|
||||
const float minh, const float maxh, unsigned short flags, unsigned char area);
|
||||
void deleteConvexVolume(int i); // todo(amos): rename to 'deleteShapeVolumes'
|
||||
void deleteShapeVolume(int i);
|
||||
void drawBoxVolumes(struct duDebugDraw* dd, const float* offset, const int hilightIdx = -1);
|
||||
void drawCylinderVolumes(struct duDebugDraw* dd, const float* offset, const int hilightIdx = -1);
|
||||
void drawConvexVolumes(struct duDebugDraw* dd, const float* offset, const int hilightIdx = -1);
|
||||
|
Loading…
x
Reference in New Issue
Block a user