LibreOffice Module slideshow (master) 1
Public Member Functions | Public Attributes | Private Attributes | List of all members
Primitive Class Reference

This class is a list of Triangles that will share Operations, and could possibly share. More...

#include <TransitionImpl.hxx>

Public Member Functions

 Primitive ()
 
 Primitive (const Primitive &rvalue)
 
Primitiveoperator= (const Primitive &rvalue)
 
void swap (Primitive &rOther)
 
void applyOperations (glm::mat4 &matrix, double nTime, double SlideWidthScale, double SlideHeightScale) const
 
void display (GLint primitiveTransformLocation, double nTime, double WidthScale, double HeightScale) const
 
void display (GLint primitiveTransformLocation, double nTime, double WidthScale, double HeightScale, int first) const
 
void pushTriangle (const glm::vec2 &SlideLocation0, const glm::vec2 &SlideLocation1, const glm::vec2 &SlideLocation2)
 PushBack a vertex,normal, and tex coord. More...
 
const glm::vec3 & getVertex (int n) const
 guards against directly changing the vertices More...
 
int getVerticesCount () const
 
int getVerticesByteSize () const
 accessor for the size of the vertices data More...
 
int writeVertices (Vertex *location) const
 copies all vertices to the C array passed More...
 

Public Attributes

Operations_t Operations
 list of Operations to be performed on this primitive.These operations will be called in the order they were pushed back in. More...
 

Private Attributes

std::vector< VertexVertices
 list of vertices More...
 

Detailed Description

This class is a list of Triangles that will share Operations, and could possibly share.

Definition at line 304 of file TransitionImpl.hxx.

Constructor & Destructor Documentation

◆ Primitive() [1/2]

Primitive::Primitive ( )
inline

Definition at line 307 of file TransitionImpl.hxx.

◆ Primitive() [2/2]

Primitive::Primitive ( const Primitive rvalue)

Definition at line 1141 of file TransitionImpl.cxx.

Member Function Documentation

◆ applyOperations()

void Primitive::applyOperations ( glm::mat4 &  matrix,
double  nTime,
double  SlideWidthScale,
double  SlideHeightScale 
) const

Definition at line 401 of file TransitionImpl.cxx.

References Operations.

Referenced by display().

◆ display() [1/2]

void Primitive::display ( GLint  primitiveTransformLocation,
double  nTime,
double  WidthScale,
double  HeightScale 
) const

Definition at line 348 of file TransitionImpl.cxx.

References applyOperations(), CHECK_GL_ERROR, getVerticesByteSize(), and Vertices.

◆ display() [2/2]

void Primitive::display ( GLint  primitiveTransformLocation,
double  nTime,
double  WidthScale,
double  HeightScale,
int  first 
) const

Definition at line 386 of file TransitionImpl.cxx.

References applyOperations(), CHECK_GL_ERROR, first, and Vertices.

◆ getVertex()

const glm::vec3 & Primitive::getVertex ( int  n) const
inline

guards against directly changing the vertices

Returns
the list of vertices

Definition at line 337 of file TransitionImpl.hxx.

References n, and Vertices.

Referenced by makeNByMTileFlip().

◆ getVerticesByteSize()

int Primitive::getVerticesByteSize ( ) const
inline

accessor for the size of the vertices data

Returns
the size in bytes of the Vertices data

Definition at line 350 of file TransitionImpl.hxx.

References Vertices.

Referenced by display().

◆ getVerticesCount()

int Primitive::getVerticesCount ( ) const
inline

Definition at line 339 of file TransitionImpl.hxx.

References o3tl::make_unsigned(), and Vertices.

◆ operator=()

Primitive & Primitive::operator= ( const Primitive rvalue)

Definition at line 1134 of file TransitionImpl.cxx.

References swap().

◆ pushTriangle()

void Primitive::pushTriangle ( const glm::vec2 &  SlideLocation0,
const glm::vec2 &  SlideLocation1,
const glm::vec2 &  SlideLocation2 
)

PushBack a vertex,normal, and tex coord.

Each SlideLocation is where on the slide is mapped to this location ( from (0,0) to (1,1) ). This will make sure the correct aspect ratio is used, and helps to make slides begin and end at the correct position. (0,0) is the top left of the slide, and (1,1) is the bottom right.

Parameters
SlideLocation0Location of first Vertex on slide
SlideLocation1Location of second Vertex on slide
SlideLocation2Location of third Vertex on slide

Definition at line 1155 of file TransitionImpl.cxx.

References Normal, and Vertices.

Referenced by createHexagon(), makeHoneycomb(), makeIris(), makeNByMTileFlip(), and makeRevolvingCircles().

◆ swap()

void Primitive::swap ( Primitive rOther)

Definition at line 1147 of file TransitionImpl.cxx.

References Operations, swap(), and Vertices.

Referenced by operator=(), and swap().

◆ writeVertices()

int Primitive::writeVertices ( Vertex location) const
inline

copies all vertices to the C array passed

Returns
the number of written vertices

Definition at line 357 of file TransitionImpl.hxx.

References Vertices.

Member Data Documentation

◆ Operations

Operations_t Primitive::Operations

list of Operations to be performed on this primitive.These operations will be called in the order they were pushed back in.

In OpenGL this effectively uses the operations in the opposite order they were pushed back.

Returns
the list of Operations

Definition at line 368 of file TransitionImpl.hxx.

Referenced by applyOperations(), makeIris(), makeNByMTileFlip(), makeRevolvingCircles(), and swap().

◆ Vertices

std::vector<Vertex> Primitive::Vertices
private

list of vertices

Definition at line 373 of file TransitionImpl.hxx.

Referenced by display(), getVertex(), getVerticesByteSize(), getVerticesCount(), pushTriangle(), swap(), and writeVertices().


The documentation for this class was generated from the following files: