Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/WolfireGames/overgrowth.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Objects/navmeshregionobject.cpp')
-rw-r--r--Source/Objects/navmeshregionobject.cpp25
1 files changed, 11 insertions, 14 deletions
diff --git a/Source/Objects/navmeshregionobject.cpp b/Source/Objects/navmeshregionobject.cpp
index 8cc470eb..c9d7a7c5 100644
--- a/Source/Objects/navmeshregionobject.cpp
+++ b/Source/Objects/navmeshregionobject.cpp
@@ -1,7 +1,7 @@
//-----------------------------------------------------------------------------
// Name: navmeshregionobject.cpp
// Developer: Wolfire Games LLC
-// Description:
+// Description:
// License: Read below
//-----------------------------------------------------------------------------
//
@@ -37,28 +37,27 @@
#include <Main/scenegraph.h>
#include <Objects/envobject.h>
-NavmeshRegionObject::NavmeshRegionObject()
-{
+NavmeshRegionObject::NavmeshRegionObject() {
permission_flags = CAN_TRANSLATE | CAN_SCALE | CAN_SELECT | CAN_COPY | CAN_DELETE;
box_.dims = vec3(1.0f);
- box_color = vec4(0.1f,0.1f,1.0f,1.0f);
+ box_color = vec4(0.1f, 0.1f, 1.0f, 1.0f);
}
NavmeshRegionObject::~NavmeshRegionObject() {
}
void NavmeshRegionObject::Draw() {
- //Check if we should be drawn.
- if(scenegraph_->map_editor->state_ == MapEditor::kInGame || Graphics::Instance()->media_mode() || ActiveCameras::Instance()->Get()->GetFlags() == Camera::kPreviewCamera){
+ // Check if we should be drawn.
+ if (scenegraph_->map_editor->state_ == MapEditor::kInGame || Graphics::Instance()->media_mode() || ActiveCameras::Instance()->Get()->GetFlags() == Camera::kPreviewCamera) {
return;
}
}
-void NavmeshRegionObject::GetDesc(EntityDescription &desc) const {
+void NavmeshRegionObject::GetDesc(EntityDescription& desc) const {
Object::GetDesc(desc);
}
-bool NavmeshRegionObject::SetFromDesc( const EntityDescription& desc ) {
+bool NavmeshRegionObject::SetFromDesc(const EntityDescription& desc) {
return Object::SetFromDesc(desc);
}
@@ -66,12 +65,10 @@ bool NavmeshRegionObject::Initialize() {
return true;
}
-vec3 NavmeshRegionObject::GetMinBounds()
-{
- return (GetTransform() * vec4(-0.5,-0.5,-0.5,1.0f)).xyz();
+vec3 NavmeshRegionObject::GetMinBounds() {
+ return (GetTransform() * vec4(-0.5, -0.5, -0.5, 1.0f)).xyz();
}
-vec3 NavmeshRegionObject::GetMaxBounds()
-{
- return (GetTransform() * vec4(0.5,0.5,0.5,1.0f) ).xyz();
+vec3 NavmeshRegionObject::GetMaxBounds() {
+ return (GetTransform() * vec4(0.5, 0.5, 0.5, 1.0f)).xyz();
}