3#include "../../../../Source/Components/Core/DynamicComponent.h"
4#include "../../../../Source/Resources/Resources.h"
7#include "Foundation/ComponentModel/Entity.h"
10#include <glm/vec4.hpp>
11#include <glm/mat4x4.hpp>
72 float tickSizeOffset = 0.05f;
92 static void registerType();
94 void initialize(
Context * context);
98 bool initialUpdate =
true;
106 std::vector<EntityPtr> unprocessedAutoNodes;
110 bool visible =
false;
122 bool visible =
false;
127 void updateQuadGeometry(
int face,
EntityPtr material);
129 void updateCorners();
133 void updateTickSizes();
135 void updateFaceVisibilites(
bool forceUpdate);
137 void updateEdgeVisibilites(
bool forceUpdate);
139 void updateAxisLabels(
bool forceUpdate);
141 void updateGridGeometry(
int face);
143 void updateAnnotationAxes();
148template<>
inline Cogs::StringView getName<Cogs::Core::AxisCubeComponent>() {
return "AxisCubeComponent"; }
A Context instance contains all the services, systems and runtime components needed to use Cogs.
Base class for components implementing dynamic behavior.
Provides a weakly referenced view over the contents of a string.
std::shared_ptr< ComponentModel::Entity > EntityPtr
Smart pointer for Entity access.
Contains all Cogs related functionality.
A cube with grids on the side faces.
glm::mat4 worldToLocal
Cached inverted local to world matrix.
glm::vec3 adjustedMinCorner
Minimum corner of the cube.
glm::vec3 autoAdjustMargin
A margin applied to the bounding box of the encased Entity, this property only works alongside autoNo...
glm::vec3 corners[8]
Local-space positions of the eight corners.
float tickProtrusion
Distance the grid lines protrude through the edge.
glm::vec3 unitScales
Size of unit coordinate axis in unitname-units.
glm::vec3 minCorner
Minimum corner of the cube.
float annotationGap
Distance between axis annotations.
std::vector< std::string > unitNames
Name of the x,y,z-axis units.
glm::vec3 maxCorner
Maximum corner of the cube.
int maxAxisValues
The maximum number of axis annotation values to use.
bool useAxisAnnotations
If the axis cube should create axis annotation text.
std::vector< WeakEntityPtr > autoNodes
Entities(Nodes) that are to be encased by this AxisCube.
glm::vec4 textColor
Color of text, to be forwarded to children.
glm::vec3 adjustedMaxCorner
Maximum corner of the cube.
glm::bvec3 markerFaces
False if wall-marker should lie on min-face, true if max-face.
glm::vec3 tickSizes
Size of axis ticks (in unit-units):
bool autoAdjustToLargestDimension
If the auto adjustment should make the box equal in size along all axes.
float zScale
Amount to scale the z-axis.
std::vector< std::string > axisTitles
Titles for the x,y,z-axises.