29 #include "../idlib/precompiled.h"
42 static const char *beam_SnapshotName =
"_beam_Snapshot_";
77 if ( renderEntity ==
NULL || viewDef ==
NULL ) {
82 if ( cachedModel !=
NULL ) {
84 assert( dynamic_cast<idRenderModelStatic *>( cachedModel ) !=
NULL );
88 surf = *staticModel->
Surface( 0 );
94 staticModel->
InitEmpty( beam_SnapshotName );
136 idVec3 localView, localTarget;
137 float modelMatrix[16];
142 idVec3 major = localTarget;
145 idVec3 mid = 0.5f * localTarget;
146 idVec3 dir = mid - localView;
147 minor.
Cross( major, dir );
170 tri->
verts[2].
xyz = localTarget + minor;
176 tri->
verts[3].
xyz = localTarget - minor;
198 if ( !renderEntity ) {
203 float modelMatrix[16];
assert(prefInfo.fullscreenBtn)
virtual idRenderModel * InstantiateDynamicModel(const struct renderEntity_s *ent, const struct viewDef_s *view, idRenderModel *cachedModel)
virtual dynamicModel_t IsDynamicModel() const
virtual const modelSurface_t * Surface(int surfaceNum) const
const idMaterial * shader
const int SHADERPARM_GREEN
virtual const char * Name() const =0
GLclampf GLclampf GLclampf alpha
const int SHADERPARM_BEAM_END_X
srfTriangles_t * R_AllocStaticTriSurf(void)
idVec3 Cross(const idVec3 &a) const
const int SHADERPARM_BEAM_WIDTH
int Icmp(const char *text) const
const int SHADERPARM_ALPHA
virtual bool IsLoaded() const
const int SHADERPARM_BLUE
bool AddPoint(const idVec3 &v)
virtual void InitEmpty(const char *name)
static int FtoiFast(float f)
virtual idBounds Bounds(const struct renderEntity_s *ent) const
srfTriangles_t * geometry
void R_BoundTriSurf(srfTriangles_t *tri)
void R_GlobalPointToLocal(const float modelMatrix[16], const idVec3 &in, idVec3 &out)
void R_AllocStaticTriSurfIndexes(srfTriangles_t *tri, int numIndexes)
idBounds & ExpandSelf(const float d)
void R_AxisToModelMatrix(const idMat3 &axis, const idVec3 &origin, float modelMatrix[16])
void R_AllocStaticTriSurfVerts(srfTriangles_t *tri, int numVerts)
float shaderParms[MAX_ENTITY_SHADER_PARMS]
const idMaterial * defaultMaterial
virtual void AddSurface(modelSurface_t surface)