HOG2
|
#include "GLUtil.h"
#include "FPUtil.h"
#include <math.h>
#include <assert.h>
#include <vector>
#include <cstring>
Go to the source code of this file.
Functions | |
bool | fastCrossTest (float p0_x, float p0_y, float p1_x, float p1_y, float p2_x, float p2_y, float p3_x, float p3_y, float *i_x, float *i_y) |
bool | operator== (const recVec &l1, const recVec &l2) |
std::ostream & | operator<< (std::ostream &out, const recVec &loc) |
void | DrawPyramid (GLfloat x, GLfloat y, GLfloat z, GLfloat height, GLfloat width) |
Draw a pyramid with the tip at the given location, given height, and width from center to edge as width. More... | |
void | DrawBoxFrame (GLfloat xx, GLfloat yy, GLfloat zz, GLfloat rad) |
void | DrawBox (GLfloat xx, GLfloat yy, GLfloat zz, GLfloat rad) |
void | DrawCylinder (GLfloat xx, GLfloat yy, GLfloat zz, GLfloat innerRad, GLfloat outerRad, GLfloat height) |
void | OutlineRect (GLdouble left, GLdouble top, GLdouble right, GLdouble bottom, double zz) |
void | DrawSquare (GLdouble xx, GLdouble yy, GLdouble zz, GLdouble rad) |
void | FrameCircle (GLdouble _x, GLdouble _y, GLdouble tRadius, GLdouble lineWidth, int segments, float rotation) |
void | DrawCircle (GLdouble _x, GLdouble _y, GLdouble tRadius, int segments, float rotation) |
void | DrawSphere (GLdouble _x, GLdouble _y, GLdouble _z, GLdouble tRadius) |
void | DrawText (double x, double y, double z, double scale, const char *str) |
void | DrawTextCentered (double x, double y, double z, double scale, const char *str) |
void | SetLighting (GLfloat ambientf, GLfloat diffusef, GLfloat specularf) |
Variables | |
GLfloat | vertices3 [] |
GLubyte | indices [] |
void DrawBox | ( | GLfloat | xx, |
GLfloat | yy, | ||
GLfloat | zz, | ||
GLfloat | rad | ||
) |
Definition at line 285 of file GLUtil.cpp.
References indices, and vertices3.
Referenced by VoxelGrid::OpenGLDraw(), Voxels::OpenGLDraw(), PancakePuzzle< N >::OpenGLDraw(), TOH< patternDisks >::OpenGLDraw(), and Fling::OpenGLDraw().
void DrawBoxFrame | ( | GLfloat | xx, |
GLfloat | yy, | ||
GLfloat | zz, | ||
GLfloat | rad | ||
) |
Definition at line 252 of file GLUtil.cpp.
Referenced by AirplaneEnvironment::OpenGLDraw(), and Voxels::OpenGLDraw().
void DrawCircle | ( | GLdouble | _x, |
GLdouble | _y, | ||
GLdouble | tRadius, | ||
int | segments, | ||
float | rotation | ||
) |
Definition at line 421 of file GLUtil.cpp.
References rotation, and TWOPI.
Referenced by DoDrawCommands(), DrawGraphics(), and DrawLines().
void DrawCylinder | ( | GLfloat | xx, |
GLfloat | yy, | ||
GLfloat | zz, | ||
GLfloat | innerRad, | ||
GLfloat | outerRad, | ||
GLfloat | height | ||
) |
Definition at line 309 of file GLUtil.cpp.
Referenced by AirplaneEnvironment::OpenGLDraw(), and TOH< patternDisks >::OpenGLDraw().
void DrawPyramid | ( | GLfloat | x, |
GLfloat | y, | ||
GLfloat | z, | ||
GLfloat | height, | ||
GLfloat | width | ||
) |
Draw a pyramid with the tip at the given location, given height, and width from center to edge as width.
Definition at line 185 of file GLUtil.cpp.
References height, ROOT2D2, and width.
Referenced by SearchUnit::OpenGLDraw().
void DrawSphere | ( | GLdouble | _x, |
GLdouble | _y, | ||
GLdouble | _z, | ||
GLdouble | tRadius | ||
) |
Definition at line 433 of file GLUtil.cpp.
References PID2, point3d, and TWOPI.
Referenced by MapUnit::OpenGLDraw(), AbsMapUnit::OpenGLDraw(), SearchUnit::OpenGLDraw(), NaryTree::OpenGLDraw(), Map2DConstrainedEnvironment::OpenGLDraw(), MCEnvironment::OpenGLDraw(), MNAgentEnvironment::OpenGLDraw(), Directional2DEnvironment::OpenGLDraw(), MapEnvironment::OpenGLDraw(), Fling::OpenGLDraw(), and GraphDistanceHeuristic::OpenGLDraw().
void DrawSquare | ( | GLdouble | xx, |
GLdouble | yy, | ||
GLdouble | zz, | ||
GLdouble | rad | ||
) |
Definition at line 396 of file GLUtil.cpp.
Referenced by CanonicalGraphEnvironment::OpenGLDraw(), CanonicalGrid::CanonicalGrid::OpenGLDraw(), and GraphEnvironment::OpenGLDraw().
void DrawText | ( | double | x, |
double | y, | ||
double | z, | ||
double | scale, | ||
const char * | str | ||
) |
Definition at line 526 of file GLUtil.cpp.
Referenced by AStarDelay::DrawEdge(), Prop::DrawEdge(), DrawGraphics(), GraphEnvironment::GLLabelState(), MapOverlay::OpenGLDraw(), CanonicalGraphEnvironment::OpenGLDraw(), and GraphEnvironment::OpenGLDraw().
void DrawTextCentered | ( | double | x, |
double | y, | ||
double | z, | ||
double | scale, | ||
const char * | str | ||
) |
Definition at line 542 of file GLUtil.cpp.
References width.
Referenced by DrawGraphics(), CanonicalGraphEnvironment::OpenGLDraw(), and GraphEnvironment::OpenGLDraw().
bool fastCrossTest | ( | float | p0_x, |
float | p0_y, | ||
float | p1_x, | ||
float | p1_y, | ||
float | p2_x, | ||
float | p2_y, | ||
float | p3_x, | ||
float | p3_y, | ||
float * | i_x, | ||
float * | i_y | ||
) |
Definition at line 160 of file GLUtil.cpp.
Referenced by line2d::crosses().
void FrameCircle | ( | GLdouble | _x, |
GLdouble | _y, | ||
GLdouble | tRadius, | ||
GLdouble | lineWidth, | ||
int | segments, | ||
float | rotation | ||
) |
Definition at line 407 of file GLUtil.cpp.
References rotation, and TWOPI.
Referenced by DoDrawCommands(), and DrawGraphics().
std::ostream& operator<< | ( | std::ostream & | out, |
const recVec & | loc | ||
) |
Definition at line 27 of file GLUtil.cpp.
Definition at line 22 of file GLUtil.cpp.
void OutlineRect | ( | GLdouble | left, |
GLdouble | top, | ||
GLdouble | right, | ||
GLdouble | bottom, | ||
double | zz | ||
) |
Definition at line 384 of file GLUtil.cpp.
Referenced by CanonicalGraphEnvironment::OpenGLDraw(), and GraphEnvironment::OpenGLDraw().
void SetLighting | ( | GLfloat | ambientf, |
GLfloat | diffusef, | ||
GLfloat | specularf | ||
) |
Definition at line 565 of file GLUtil.cpp.
Referenced by buildGL().
GLubyte indices[] |
Definition at line 245 of file GLUtil.cpp.
Referenced by DrawBox().
GLfloat vertices3[] |
Definition at line 215 of file GLUtil.cpp.
Referenced by DrawBox().