41 LinesInternal::LinesInternal(
const string&
id,
float lineWidth,
const vector<Vector3>& points,
const Color4& color,
const vector<Color4>& colors,
Texture* texture)
57 if (points.size() > 1) {
60 for (
const auto& point:
points) {
101 auto created =
false;
103 vboIds = vboManaged->getVBOIds();
110 auto fbPoints = ObjectBuffer::getByteBuffer(contextIdx,
points.size() * 3 *
sizeof(
float))->asFloatBuffer();
111 for (
const auto& point:
points) fbPoints.put(point.getArray());
117 auto fbColors = ObjectBuffer::getByteBuffer(contextIdx,
points.size() * 4 *
sizeof(
float))->asFloatBuffer();
Color 4 definition class.
const array< float, 4 > & getArray() const
void set(float r, float g, float b, float a)
Sets this color by its components.
static Engine * getInstance()
Returns engine instance.
static TextureManager * getTextureManager()
static VBOManager * getVBOManager()
const string & getId() const
Axis aligned bounding box used for frustum, this is not directly connectable with physics engine.
void extend(BoundingBox *boundingBox)
Extend bounding box with given bounding box.
void update()
Updates this bounding box.
Transform parentTransform
void initialize()
Initialize.
void update() override
Update transform.
Matrix4x4 entityTransformMatrix
void setTransform(const Transform &transform) override
From transform.
void updateBoundingBox()
Update bounding volume.
vector< int32_t > * vboIds
virtual ~LinesInternal()
Destructor.
void removeTexture(Texture *texture)
Removes a texture from manager.
TextureManager_TextureManaged * addTexture(const string &id, bool &created)
Adds a texture to manager.
VBOManager_VBOManaged * addVBO(const string &vboId, int32_t ids, bool useGPUMemory, bool shared, bool &created)
Adds a VBO to manager or retrieve VBO if existing.
void removeVBO(const string &vboId)
Removes a VBO from manager.
int32_t CONTEXTINDEX_DEFAULT
virtual void uploadBufferObject(int contextIdx, int32_t bufferObjectId, int32_t size, FloatBuffer *data)=0
Uploads buffer data to buffer object.
Buffers used to transfer data between main memory to graphics board memory.
Matrix4x4 class representing matrix4x4 mathematical structure and operations for 3d space.
Matrix4x4 & identity()
Creates identity matrix.
Vector3 class representing vector3 mathematical structure and operations with x, y,...
Vector3 & set(float x, float y, float z)
Sets this vector3 by its components.
virtual void releaseReference()
Releases a reference, thus decrementing the counter and delete it if reference counter is zero.