Пример #1
0
void CCharShape::TraverseDagForShadow(const TCharNode *node, const TMatrix<4, 4>& mat) {
	TMatrix<4, 4> new_matrix = mat * node->trans;
	if (node->visible && node->render_shadow)
		DrawShadowSphere (new_matrix);

	TCharNode* child = node->child;
	while (child != NULL) {
		TraverseDagForShadow (child, new_matrix);
		child = child->next;
	}
}
Пример #2
0
void CCharShape::DrawShadow () {
	if (g_game.light_id == 1 || g_game.light_id == 3) return;

	ScopedRenderMode rm(TUX_SHADOW);
	glColor(shad_col);

	TCharNode *node = GetNode(0);
	if (node == NULL) {
		Message ("couldn't find tux's root node");
		return;
	}
	TraverseDagForShadow(node, TMatrix<4, 4>::getIdentity());
}
Пример #3
0
void CCharShape::TraverseDagForShadow (const TCharNode *node, const TMatrix mat) {
    TMatrix new_matrix;

    MultiplyMatrices (new_matrix, mat, node->trans);
    if (node->visible && node->render_shadow)
        DrawShadowSphere (new_matrix);

    TCharNode* child = node->child;
    while (child != NULL) {
        TraverseDagForShadow (child, new_matrix);
        child = child->next;
    }
}
Пример #4
0
void CCharShape::DrawShadow () {
    TMatrix model_matrix;
    TCharNode *node;

    if (g_game.light_id == 1 || g_game.light_id == 3) return;

    set_gl_options (TUX_SHADOW); 
    glColor4f (shad_col.r, shad_col.g, shad_col.b, shad_col.a);
    MakeIdentityMatrix (model_matrix);

    if (GetNode (0, &node) == false) {
		Message ("couldn't find tux's root node", "");
		return;
    } 
    TraverseDagForShadow (node, model_matrix);
}
Пример #5
0
void CCharShape::DrawShadow () {
    TMatrix model_matrix;

    if (g_game.light_id == 1 || g_game.light_id == 3) return;

    ScopedRenderMode rm(TUX_SHADOW);
    glColor4f (shad_col.r, shad_col.g, shad_col.b, shad_col.a);
    MakeIdentityMatrix (model_matrix);

    TCharNode *node = GetNode(0);
    if (node == NULL) {
        Message ("couldn't find tux's root node", "");
        return;
    }
    TraverseDagForShadow (node, model_matrix);
}