PageRenderTime 6ms CodeModel.GetById 1ms app.highlight 3ms RepoModel.GetById 1ms app.codeStats 0ms

/src/renderer/visual.h

https://bitbucket.org/vivkin/gam3b00bs/
C++ Header | 54 lines | 28 code | 14 blank | 12 comment | 0 complexity | a16b43e1a0f2c59f05bd05eb46e1376d MD5 | raw file
 1#pragma once
 2//-----------------------------------------------------------------------------
 3
 4#include "renderer/device.h"
 5#include "renderer/mesh.h"
 6//-----------------------------------------------------------------------------
 7
 8struct visual_t
 9{
10	D3DMATERIAL9	material;
11	mesh_h			mesh;
12	texture_h		texture[2];
13	vertex_layout_h	v_layout;
14
15	D3DXVECTOR3		position;
16	float			pitch;
17	float			yaw;
18	float			roll;
19	float			scaleu;	// uniform scale
20
21	D3DXMATRIX		transform;
22};
23
24typedef visual_t* visual_h;
25//-----------------------------------------------------------------------------
26
27visual_h visual_create( const char* mesh_name, 
28						const char* texture0_path, 
29						const char* texture1_path );
30//-----------------------------------------------------------------------------
31
32visual_h visual_create( mesh_h mesh, texture_h tex0, texture_h tex1 );
33//-----------------------------------------------------------------------------
34
35void visual_set_position( visual_h vis, const D3DXVECTOR3& pos );
36//-----------------------------------------------------------------------------
37
38void visual_set_rotation( visual_h vis, float pitch, float yaw, float roll );
39//-----------------------------------------------------------------------------
40
41void visual_set_scaleu( visual_h vis, float scale );
42//-----------------------------------------------------------------------------
43
44void visual_remove( visual_h vis );
45//-----------------------------------------------------------------------------
46
47void visual_draw( visual_h vis );
48//-----------------------------------------------------------------------------
49
50void visual_render( visual_h vis );
51//-----------------------------------------------------------------------------
52
53void visuals_render_all();
54//-----------------------------------------------------------------------------