Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

PrimitiveRenderer.h

Go to the documentation of this file.
00001 //------------------------------------------------------------------------------
00002 // Lamp : Open source game middleware
00003 // Copyright (C) 2004  Junpei Ohtani ( Email : junpee@users.sourceforge.jp )
00004 //
00005 // This library is free software; you can redistribute it and/or
00006 // modify it under the terms of the GNU Lesser General Public
00007 // License as published by the Free Software Foundation; either
00008 // version 2.1 of the License, or (at your option) any later version.
00009 //
00010 // This library is distributed in the hope that it will be useful,
00011 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00013 // Lesser General Public License for more details.
00014 //
00015 // You should have received a copy of the GNU Lesser General Public
00016 // License along with this library; if not, write to the Free Software
00017 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 //------------------------------------------------------------------------------
00019 
00020 /** @file
00021  * プリミティブレンダラヘッダ
00022  * @author Junpee
00023  */
00024 
00025 #ifndef PRIMITIVE_RENDERER_H_
00026 #define PRIMITIVE_RENDERER_H_
00027 
00028 #include <Graphics/System/GraphicsDeviceObjectHolder.h>
00029 #include <Core/Container/ArrayList.h>
00030 #include <Graphics/PrimitiveRenderer/PrimitiveDrawRequest.h>
00031 
00032 namespace Lamp{
00033 
00034 class Camera;
00035 
00036 //------------------------------------------------------------------------------
00037 /**
00038  * プリミティブレンダラ
00039  */
00040 class PrimitiveRenderer : public GraphicsDeviceObjectHolder{
00041 public:
00042     //--------------------------------------------------------------------------
00043     // 生成、破棄
00044     //--------------------------------------------------------------------------
00045     /**
00046      * コンストラクタ
00047      */
00048     PrimitiveRenderer();
00049 
00050     /**
00051      * デストラクタ
00052      */
00053     virtual ~PrimitiveRenderer();
00054 
00055     //--------------------------------------------------------------------------
00056     // レンダリング
00057     //--------------------------------------------------------------------------
00058     /**
00059      * レンダリング
00060      * @param viewMatrix ビュー行列
00061      * @param projectionMatrix 投影行列
00062      */
00063     virtual void render(const Matrix44& viewMatrix,
00064         const Matrix44& projectionMatrix);
00065 
00066     /**
00067      * レンダリング
00068      * @param camera カメラ
00069      */
00070     virtual void render(Camera* camera);
00071 
00072     //--------------------------------------------------------------------------
00073     // リクエスト
00074     //--------------------------------------------------------------------------
00075     /**
00076      * リクエスト
00077      * @param primitive プリミティブ
00078      * @param matrix 行列
00079      * @param color 色
00080      * @param zTest Zテストを行うならtrue
00081      */
00082     virtual void request(const PrimitiveDrawRequest& primitive,
00083         const Matrix34& matrix, Color4c color = Color4c::white,
00084         bool zTest = true);
00085 
00086     /**
00087      * リクエスト
00088      * @param primitive プリミティブ
00089      * @param scale スケール
00090      * @param rotationXYZ XYZ回転
00091      * @param translation 移動
00092      * @param color 色
00093      * @param zTest Zテストを行うならtrue
00094      */
00095     virtual void request(const PrimitiveDrawRequest& primitive,
00096         const Vector3& scale, const Vector3& rotationXYZ,
00097         const Vector3 translation, Color4c color = Color4c::white,
00098         bool zTest = true){
00099         Matrix34 matrix;
00100         matrix.setTransformationXYZ(scale, rotationXYZ, translation);
00101         request(primitive, matrix, color, zTest);
00102     }
00103 
00104     /**
00105      * リクエスト
00106      * @param primitive プリミティブ
00107      * @param scale スケール
00108      * @param rotationQuaternion 四元数回転
00109      * @param translation 移動
00110      * @param color 色
00111      * @param zTest Zテストを行うならtrue
00112      */
00113     virtual void request(const PrimitiveDrawRequest& primitive,
00114         const Vector3& scale, const Quaternion& rotationQuaternion,
00115         const Vector3 translation, Color4c color = Color4c::white,
00116         bool zTest = true){
00117         Matrix34 matrix;
00118         matrix.setTransformationQuaternion(
00119             scale, rotationQuaternion, translation);
00120         request(primitive, matrix, color, zTest);
00121     }
00122 
00123     //--------------------------------------------------------------------------
00124     /**
00125      * 線のリクエスト
00126      * @param vertexCount 頂点数
00127      * @param positions 位置配列
00128      * @param matrix 行列
00129      * @param color 色
00130      * @param zTest Zテストを行うならtrue
00131      */
00132     virtual void requestLine(int vertexCount, Vector3* positions,
00133         const Matrix34& matrix, Color4c color = Color4c::white,
00134         bool zTest = true);
00135 
00136     /**
00137      * 線のリクエスト
00138      * @param vertexCount 頂点数
00139      * @param positions 位置配列
00140      * @param scale スケール
00141      * @param rotationXYZ XYZ回転
00142      * @param translation 移動
00143      * @param color 色
00144      * @param zTest Zテストを行うならtrue
00145      */
00146     virtual void requestLine(int vertexCount, Vector3* positions,
00147         const Vector3& scale, const Vector3& rotationXYZ,
00148         const Vector3 translation, Color4c color = Color4c::white,
00149         bool zTest = true){
00150         Matrix34 matrix;
00151         matrix.setTransformationXYZ(scale, rotationXYZ, translation);
00152         requestLine(vertexCount, positions, matrix, color, zTest);
00153     }
00154 
00155     /**
00156      * 線のリクエスト
00157      * @param vertexCount 頂点数
00158      * @param positions 位置配列
00159      * @param scale スケール
00160      * @param rotationQuaternion 四元数回転
00161      * @param translation 移動
00162      * @param color 色
00163      * @param zTest Zテストを行うならtrue
00164      */
00165     virtual void requestLine(int vertexCount, Vector3* positions,
00166         const Vector3& scale, const Quaternion& rotationQuaternion,
00167         const Vector3 translation, Color4c color = Color4c::white,
00168         bool zTest = true){
00169         Matrix34 matrix;
00170         matrix.setTransformationQuaternion(
00171             scale, rotationQuaternion, translation);
00172         requestLine(vertexCount, positions, matrix, color, zTest);
00173     }
00174 
00175     //--------------------------------------------------------------------------
00176     /**
00177      * 線のリクエスト
00178      * @param vertexCount 頂点数
00179      * @param positions 位置配列
00180      * @param colors 色配列
00181      * @param matrix 行列
00182      * @param color 色
00183      * @param zTest Zテストを行うならtrue
00184      */
00185     virtual void requestLine(int vertexCount, Vector3* positions,
00186         Color4c* colors, const Matrix34& matrix,
00187         Color4c color = Color4c::white, bool zTest = true);
00188 
00189     /**
00190      * 線のリクエスト
00191      * @param vertexCount 頂点数
00192      * @param positions 位置配列
00193      * @param colors 色配列
00194      * @param scale スケール
00195      * @param rotationXYZ XYZ回転
00196      * @param translation 移動
00197      * @param color 色
00198      * @param zTest Zテストを行うならtrue
00199      */
00200     virtual void requestLine(int vertexCount, Vector3* positions,
00201         Color4c* colors, const Vector3& scale, const Vector3& rotationXYZ,
00202         const Vector3 translation, Color4c color = Color4c::white,
00203         bool zTest = true){
00204         Matrix34 matrix;
00205         matrix.setTransformationXYZ(scale, rotationXYZ, translation);
00206         requestLine(vertexCount, positions, colors, matrix, color, zTest);
00207     }
00208 
00209     /**
00210      * 線のリクエスト
00211      * @param vertexCount 頂点数
00212      * @param positions 位置配列
00213      * @param colors 色配列
00214      * @param scale スケール
00215      * @param rotationQuaternion 四元数回転
00216      * @param translation 移動
00217      * @param color 色
00218      * @param zTest Zテストを行うならtrue
00219      */
00220     virtual void requestLine(int vertexCount, Vector3* positions,
00221         Color4c* colors, const Vector3& scale,
00222         const Quaternion& rotationQuaternion, const Vector3 translation,
00223         Color4c color = Color4c::white, bool zTest = true){
00224         Matrix34 matrix;
00225         matrix.setTransformationQuaternion(
00226             scale, rotationQuaternion, translation);
00227         requestLine(vertexCount, positions, colors, matrix, color, zTest);
00228     }
00229 
00230     //--------------------------------------------------------------------------
00231     // プリミティブリクエスト
00232     //--------------------------------------------------------------------------
00233     /**
00234      * ポイントのリクエスト
00235      * @param matrix 行列
00236      * @param color 色
00237      * @param zTest Zテストを行うならtrue
00238      */
00239     virtual void requestPoint(const Matrix34& matrix,
00240         Color4c color = Color4c::white, bool zTest = true){
00241         request(point_, matrix, color, zTest);
00242     }
00243 
00244     /**
00245      * ポイントのリクエスト
00246      * @param scale スケール
00247      * @param rotationXYZ XYZ回転
00248      * @param translation 移動
00249      * @param color 色
00250      * @param zTest Zテストを行うならtrue
00251      */
00252     virtual void requestPoint(const Vector3& scale,
00253         const Vector3& rotationXYZ, const Vector3 translation,
00254         Color4c color = Color4c::white, bool zTest = true){
00255         request(point_, scale, rotationXYZ, translation, color, zTest);
00256     }
00257 
00258     /**
00259      * ポイントのリクエスト
00260      * @param scale スケール
00261      * @param rotationQuaternion 四元数回転
00262      * @param translation 移動
00263      * @param color 色
00264      * @param zTest Zテストを行うならtrue
00265      */
00266     virtual void requestPoint(const Vector3& scale,
00267         const Quaternion& rotationQuaternion, const Vector3 translation,
00268         Color4c color = Color4c::white, bool zTest = true){
00269         request(point_, scale, rotationQuaternion, translation, color, zTest);
00270     }
00271 
00272     //--------------------------------------------------------------------------
00273     /**
00274      * 軸ポイントのリクエスト
00275      * @param matrix 行列
00276      * @param color 色
00277      * @param zTest Zテストを行うならtrue
00278      */
00279     virtual void requestAxisPoint(const Matrix34& matrix,
00280         Color4c color = Color4c::white, bool zTest = true){
00281         request(axisAxisPoint_, matrix, color, zTest);
00282     }
00283 
00284     /**
00285      * 軸ポイントのリクエスト
00286      * @param scale スケール
00287      * @param rotationXYZ XYZ回転
00288      * @param translation 移動
00289      * @param color 色
00290      * @param zTest Zテストを行うならtrue
00291      */
00292     virtual void requestAxisPoint(const Vector3& scale,
00293         const Vector3& rotationXYZ, const Vector3 translation,
00294         Color4c color = Color4c::white, bool zTest = true){
00295         request(axisAxisPoint_, scale, rotationXYZ, translation, color, zTest);
00296     }
00297 
00298     /**
00299      * 軸ポイントのリクエスト
00300      * @param scale スケール
00301      * @param rotationQuaternion 四元数回転
00302      * @param translation 移動
00303      * @param color 色
00304      * @param zTest Zテストを行うならtrue
00305      */
00306     virtual void requestAxisPoint(const Vector3& scale,
00307         const Quaternion& rotationQuaternion, const Vector3 translation,
00308         Color4c color = Color4c::white, bool zTest = true){
00309         request(axisAxisPoint_, scale, rotationQuaternion, translation, color, zTest);
00310     }
00311 
00312     //--------------------------------------------------------------------------
00313     /**
00314      * 軸のリクエスト
00315      * @param matrix 行列
00316      * @param color 色
00317      * @param zTest Zテストを行うならtrue
00318      */
00319     virtual void requestAxis(const Matrix34& matrix,
00320         Color4c color = Color4c::white, bool zTest = true){
00321         request(axis_, matrix, color, zTest);
00322     }
00323 
00324     /**
00325      * 軸のリクエスト
00326      * @param scale スケール
00327      * @param rotationXYZ XYZ回転
00328      * @param translation 移動
00329      * @param color 色
00330      * @param zTest Zテストを行うならtrue
00331      */
00332     virtual void requestAxis(const Vector3& scale,
00333         const Vector3& rotationXYZ, const Vector3 translation,
00334         Color4c color = Color4c::white, bool zTest = true){
00335         request(axis_, scale, rotationXYZ, translation, color, zTest);
00336     }
00337 
00338     /**
00339      * 軸のリクエスト
00340      * @param scale スケール
00341      * @param rotationQuaternion 四元数回転
00342      * @param translation 移動
00343      * @param color 色
00344      * @param zTest Zテストを行うならtrue
00345      */
00346     virtual void requestAxis(const Vector3& scale,
00347         const Quaternion& rotationQuaternion, const Vector3 translation,
00348         Color4c color = Color4c::white, bool zTest = true){
00349         request(axis_, scale, rotationQuaternion, translation, color, zTest);
00350     }
00351 
00352     //--------------------------------------------------------------------------
00353     /**
00354      * 矢印のリクエスト
00355      * @param matrix 行列
00356      * @param color 色
00357      * @param zTest Zテストを行うならtrue
00358      */
00359     virtual void requestArrow(const Matrix34& matrix,
00360         Color4c color = Color4c::white, bool zTest = true){
00361         request(arrow_, matrix, color, zTest);
00362     }
00363 
00364     /**
00365      * 矢印のリクエスト
00366      * @param scale スケール
00367      * @param rotationXYZ XYZ回転
00368      * @param translation 移動
00369      * @param color 色
00370      * @param zTest Zテストを行うならtrue
00371      */
00372     virtual void requestArrow(const Vector3& scale,
00373         const Vector3& rotationXYZ, const Vector3 translation,
00374         Color4c color = Color4c::white, bool zTest = true){
00375         request(arrow_, scale, rotationXYZ, translation, color, zTest);
00376     }
00377 
00378     /**
00379      * 矢印のリクエスト
00380      * @param scale スケール
00381      * @param rotationQuaternion 四元数回転
00382      * @param translation 移動
00383      * @param color 色
00384      * @param zTest Zテストを行うならtrue
00385      */
00386     virtual void requestArrow(const Vector3& scale,
00387         const Quaternion& rotationQuaternion, const Vector3 translation,
00388         Color4c color = Color4c::white, bool zTest = true){
00389         request(arrow_, scale, rotationQuaternion, translation, color, zTest);
00390     }
00391 
00392     //--------------------------------------------------------------------------
00393     /**
00394      * グリッドのリクエスト
00395      * @param matrix 行列
00396      * @param color 色
00397      * @param zTest Zテストを行うならtrue
00398      */
00399     virtual void requestGrid(const Matrix34& matrix,
00400         Color4c color = Color4c::white, bool zTest = true){
00401         request(grid_, matrix, color, zTest);
00402     }
00403 
00404     /**
00405      * グリッドのリクエスト
00406      * @param scale スケール
00407      * @param rotationXYZ XYZ回転
00408      * @param translation 移動
00409      * @param color 色
00410      * @param zTest Zテストを行うならtrue
00411      */
00412     virtual void requestGrid(const Vector3& scale,
00413         const Vector3& rotationXYZ, const Vector3 translation,
00414         Color4c color = Color4c::white, bool zTest = true){
00415         request(grid_, scale, rotationXYZ, translation, color, zTest);
00416     }
00417 
00418     /**
00419      * グリッドのリクエスト
00420      * @param scale スケール
00421      * @param rotationQuaternion 四元数回転
00422      * @param translation 移動
00423      * @param color 色
00424      * @param zTest Zテストを行うならtrue
00425      */
00426     virtual void requestGrid(const Vector3& scale,
00427         const Quaternion& rotationQuaternion, const Vector3 translation,
00428         Color4c color = Color4c::white, bool zTest = true){
00429         request(grid_, scale, rotationQuaternion, translation, color, zTest);
00430     }
00431 
00432     //--------------------------------------------------------------------------
00433     /**
00434      * 平面のリクエスト
00435      * @param matrix 行列
00436      * @param color 色
00437      * @param zTest Zテストを行うならtrue
00438      */
00439     virtual void requestPlane(const Matrix34& matrix,
00440         Color4c color = Color4c::white, bool zTest = true){
00441         request(plane_, matrix, color, zTest);
00442     }
00443 
00444     /**
00445      * 平面のリクエスト
00446      * @param scale スケール
00447      * @param rotationXYZ XYZ回転
00448      * @param translation 移動
00449      * @param color 色
00450      * @param zTest Zテストを行うならtrue
00451      */
00452     virtual void requestPlane(const Vector3& scale,
00453         const Vector3& rotationXYZ, const Vector3 translation,
00454         Color4c color = Color4c::white, bool zTest = true){
00455         request(plane_, scale, rotationXYZ, translation, color, zTest);
00456     }
00457 
00458     /**
00459      * 平面のリクエスト
00460      * @param scale スケール
00461      * @param rotationQuaternion 四元数回転
00462      * @param translation 移動
00463      * @param color 色
00464      * @param zTest Zテストを行うならtrue
00465      */
00466     virtual void requestPlane(const Vector3& scale,
00467         const Quaternion& rotationQuaternion, const Vector3 translation,
00468         Color4c color = Color4c::white, bool zTest = true){
00469         request(plane_, scale, rotationQuaternion, translation, color, zTest);
00470     }
00471 
00472     //--------------------------------------------------------------------------
00473     /**
00474      * 球のリクエスト
00475      * @param matrix 行列
00476      * @param color 色
00477      * @param zTest Zテストを行うならtrue
00478      */
00479     virtual void requestSphere(const Matrix34& matrix,
00480         Color4c color = Color4c::white, bool zTest = true){
00481         request(sphere_, matrix, color, zTest);
00482     }
00483 
00484     /**
00485      * 球のリクエスト
00486      * @param scale スケール
00487      * @param rotationXYZ XYZ回転
00488      * @param translation 移動
00489      * @param color 色
00490      * @param zTest Zテストを行うならtrue
00491      */
00492     virtual void requestSphere(const Vector3& scale,
00493         const Vector3& rotationXYZ, const Vector3 translation,
00494         Color4c color = Color4c::white, bool zTest = true){
00495         request(sphere_, scale, rotationXYZ, translation, color, zTest);
00496     }
00497 
00498     /**
00499      * 球のリクエスト
00500      * @param scale スケール
00501      * @param rotationQuaternion 四元数回転
00502      * @param translation 移動
00503      * @param color 色
00504      * @param zTest Zテストを行うならtrue
00505      */
00506     virtual void requestSphere(const Vector3& scale,
00507         const Quaternion& rotationQuaternion, const Vector3 translation,
00508         Color4c color = Color4c::white, bool zTest = true){
00509         request(sphere_, scale, rotationQuaternion, translation, color, zTest);
00510     }
00511 
00512     //--------------------------------------------------------------------------
00513     /**
00514      * 箱のリクエスト
00515      * @param matrix 行列
00516      * @param color 色
00517      * @param zTest Zテストを行うならtrue
00518      */
00519     virtual void requestBox(const Matrix34& matrix,
00520         Color4c color = Color4c::white, bool zTest = true){
00521         request(box_, matrix, color, zTest);
00522     }
00523 
00524     /**
00525      * 箱のリクエスト
00526      * @param scale スケール
00527      * @param rotationXYZ XYZ回転
00528      * @param translation 移動
00529      * @param color 色
00530      * @param zTest Zテストを行うならtrue
00531      */
00532     virtual void requestBox(const Vector3& scale,
00533         const Vector3& rotationXYZ, const Vector3 translation,
00534         Color4c color = Color4c::white, bool zTest = true){
00535         request(box_, scale, rotationXYZ, translation, color, zTest);
00536     }
00537 
00538     /**
00539      * 箱のリクエスト
00540      * @param scale スケール
00541      * @param rotationQuaternion 四元数回転
00542      * @param translation 移動
00543      * @param color 色
00544      * @param zTest Zテストを行うならtrue
00545      */
00546     virtual void requestBox(const Vector3& scale,
00547         const Quaternion& rotationQuaternion, const Vector3 translation,
00548         Color4c color = Color4c::white, bool zTest = true){
00549         request(box_, scale, rotationQuaternion, translation, color, zTest);
00550     }
00551 
00552     //--------------------------------------------------------------------------
00553     /**
00554      * 円柱のリクエスト
00555      * @param matrix 行列
00556      * @param color 色
00557      * @param zTest Zテストを行うならtrue
00558      */
00559     virtual void requestCylinder(const Matrix34& matrix,
00560         Color4c color = Color4c::white, bool zTest = true){
00561         request(cylinder_, matrix, color, zTest);
00562     }
00563 
00564     /**
00565      * 円柱のリクエスト
00566      * @param scale スケール
00567      * @param rotationXYZ XYZ回転
00568      * @param translation 移動
00569      * @param color 色
00570      * @param zTest Zテストを行うならtrue
00571      */
00572     virtual void requestCylinder(const Vector3& scale,
00573         const Vector3& rotationXYZ, const Vector3 translation,
00574         Color4c color = Color4c::white, bool zTest = true){
00575         request(cylinder_, scale, rotationXYZ, translation, color, zTest);
00576     }
00577 
00578     /**
00579      * 円柱のリクエスト
00580      * @param scale スケール
00581      * @param rotationQuaternion 四元数回転
00582      * @param translation 移動
00583      * @param color 色
00584      * @param zTest Zテストを行うならtrue
00585      */
00586     virtual void requestCylinder(const Vector3& scale,
00587         const Quaternion& rotationQuaternion, const Vector3 translation,
00588         Color4c color = Color4c::white, bool zTest = true){
00589         request(cylinder_, scale, rotationQuaternion, translation,
00590             color, zTest);
00591     }
00592 
00593     //--------------------------------------------------------------------------
00594     /**
00595      * コーンのリクエスト
00596      * @param matrix 行列
00597      * @param color 色
00598      * @param zTest Zテストを行うならtrue
00599      */
00600     virtual void requestCone(const Matrix34& matrix,
00601         Color4c color = Color4c::white, bool zTest = true){
00602         request(cone_, matrix, color, zTest);
00603     }
00604 
00605     /**
00606      * コーンのリクエスト
00607      * @param scale スケール
00608      * @param rotationXYZ XYZ回転
00609      * @param translation 移動
00610      * @param color 色
00611      * @param zTest Zテストを行うならtrue
00612      */
00613     virtual void requestCone(const Vector3& scale,
00614         const Vector3& rotationXYZ, const Vector3 translation,
00615         Color4c color = Color4c::white, bool zTest = true){
00616         request(cone_, scale, rotationXYZ, translation, color, zTest);
00617     }
00618 
00619     /**
00620      * コーンのリクエスト
00621      * @param scale スケール
00622      * @param rotationQuaternion 四元数回転
00623      * @param translation 移動
00624      * @param color 色
00625      * @param zTest Zテストを行うならtrue
00626      */
00627     virtual void requestCone(const Vector3& scale,
00628         const Quaternion& rotationQuaternion, const Vector3 translation,
00629         Color4c color = Color4c::white, bool zTest = true){
00630         request(cone_, scale, rotationQuaternion, translation, color, zTest);
00631     }
00632 
00633     //--------------------------------------------------------------------------
00634     // デバイスオブジェクト
00635     //--------------------------------------------------------------------------
00636     /**
00637      * デバイスオブジェクトの初期化
00638      * @return 成功したらtrueを返す
00639      */
00640     virtual bool initializeGraphicsDeviceObjects(){ return true; }
00641 
00642     /**
00643      * デバイスオブジェクトの削除
00644      */
00645     virtual void deleteGraphicsDeviceObjects(){}
00646 
00647     /**
00648      * デバイスオブジェクトのリストア
00649      * @return 成功したらtrueを返す
00650      */
00651     virtual bool restoreGraphicsDeviceObjects(){ return true; }
00652 
00653     /**
00654      * デバイスオブジェクトの無効化
00655      */
00656     virtual void invalidateGraphicsDeviceObjects();
00657 
00658 protected:
00659     //--------------------------------------------------------------------------
00660     // リクエスト
00661     //--------------------------------------------------------------------------
00662     /**
00663      * リクエスト
00664      */
00665     class Request{
00666     public:
00667         /**
00668          * コンストラクタ
00669          */
00670         Request() : matrix_(Matrix34::unit), primitive_(),
00671             color_(Color4c::white), zTest_(true){}
00672 
00673         /**
00674          * デストラクタ
00675          */
00676         virtual ~Request(){}
00677 
00678         /// 行列
00679         Matrix34 matrix_;
00680         /// プリミティブ
00681         PrimitiveDrawRequest primitive_;
00682         /// 色
00683         Color4c color_;
00684         /// Zテストフラグ
00685         bool zTest_;
00686     };
00687 
00688     /**
00689      * リクエストの描画
00690      * @param request リクエスト
00691      */
00692     virtual void renderRequest(Request& request);
00693 
00694     //--------------------------------------------------------------------------
00695     // 頂点記述
00696     //--------------------------------------------------------------------------
00697     /**
00698      * 位置の頂点記述を設定
00699      * @return 位置の頂点記述
00700      */
00701     void setPositionVertexDeclaration();
00702 
00703     /**
00704      * 位置とカラーの頂点記述を設定
00705      * @return 位置の頂点記述
00706      */
00707     void setPositionColorVertexDeclaration();
00708 
00709     /// リクエスト
00710     ArrayList<Request> requests_;
00711     /// 位置の頂点記述
00712     Direct3DVertexDeclaration* positionDeclaration_;
00713     /// 位置とカラーの頂点記述
00714     Direct3DVertexDeclaration* positionColorDeclaration_;
00715     /// ポイント
00716     PrimitiveDrawRequest point_;
00717     /// 軸ポイント
00718     PrimitiveDrawRequest axisAxisPoint_;
00719     /// 軸
00720     PrimitiveDrawRequest axis_;
00721     /// 矢印
00722     PrimitiveDrawRequest arrow_;
00723     /// グリッド
00724     PrimitiveDrawRequest grid_;
00725     /// 平面
00726     PrimitiveDrawRequest plane_;
00727     /// 球
00728     PrimitiveDrawRequest sphere_;
00729     /// 箱
00730     PrimitiveDrawRequest box_;
00731     /// 円柱
00732     PrimitiveDrawRequest cone_;
00733     /// コーン
00734     PrimitiveDrawRequest cylinder_;
00735 
00736 private:
00737     // コピーコンストラクタの隠蔽
00738     PrimitiveRenderer(const PrimitiveRenderer& copy);
00739 
00740     // 代入コピーの隠蔽
00741     void operator =(const PrimitiveRenderer& copy);
00742 
00743 };
00744 
00745 //------------------------------------------------------------------------------
00746 } // End of namespace Lamp
00747 #endif // End of PRIMITIVE_RENDERER_H_
00748 //------------------------------------------------------------------------------
00749 

Generated on Wed Mar 16 10:29:34 2005 for Lamp by doxygen 1.3.2