亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? cvnormal.h

?? Windows上的MUD客戶端程序
?? H
字號:
/*----------------------------------------------------------------------------
                        _                              _ _       
        /\             | |                            | (_)      
       /  \   _ __   __| |_ __ ___  _ __ ___   ___  __| |_  __ _ 
      / /\ \ | '_ \ / _` | '__/ _ \| '_ ` _ \ / _ \/ _` | |/ _` |
     / ____ \| | | | (_| | | | (_) | | | | | |  __/ (_| | | (_| |
    /_/    \_\_| |_|\__,_|_|  \___/|_| |_| |_|\___|\__,_|_|\__,_|

    The contents of this file are subject to the Andromedia Public
	License Version 1.0 (the "License"); you may not use this file
	except in compliance with the License. You may obtain a copy of
	the License at http://www.andromedia.com/APL/

    Software distributed under the License is distributed on an
	"AS IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
	implied. See the License for the specific language governing
	rights and limitations under the License.

    The Original Code is Pueblo client code, released November 4, 1998.

    The Initial Developer of the Original Code is Andromedia Incorporated.
	Portions created by Andromedia are Copyright (C) 1998 Andromedia
	Incorporated.  All Rights Reserved.

	Andromedia Incorporated                         415.365.6700
	818 Mission Street - 2nd Floor                  415.365.6701 fax
	San Francisco, CA 94103

    Contributor(s):
	--------------------------------------------------------------------------
	   Chaco team:  Dan Greening, Glenn Crocker, Jim Doubek,
	                Coyote Lussier, Pritham Shetty.

					Wrote and designed original codebase.

------------------------------------------------------------------------------

	This file contains the interface for ChQvNormalMap class and its derived
	classes, these are used to compute the normals for various Qv shape nodes.

	ChQvNormalMap				- Abstract base class of various normal maps
	ChQvCubeNormals				- Computes the normals of a cube
	ChQvConeNormals				- Computes the normals of a cone
	ChQvCylinderNormals			- Computes the normals of a cylinder
	ChQvSphereNormals			- Computes the normals of a sphere
	ChQvIndexedFaceSetNormals	- Computes the normals of an indexed face set

----------------------------------------------------------------------------*/

#if !defined( _CHQVNORMALMAP_H )
#define _CHQVNORMALMAP_H

#include "GxTypes.h"
//
// For the time being use 3dr data types, we can normalize later
//
//typedef int chint32 ;
#if defined(CH_USE_3DR)
#if !defined(_3DG_H_)
typedef float Float_t ;

typedef struct {
	Float_t x, y, z ;
} PointF_t ;
#endif
#endif


class ChQvNormalMap
{
	public:
		virtual ~ChQvNormalMap() {}

		virtual chint32   GetNumParts() = 0 ;

		virtual chint32   GetNumFaces( chint32 lPart = 0 ) = 0 ;

		virtual chint32   GetNumVertices( chint32 lFace = 0,
										  chint32 lPart = 0 ) = 0 ;


		virtual GxVec3f  GetPartNormal( chint32 lPart ) = 0 ;

		virtual GxVec3f  GetFaceNormal( chint32 lFace,
										 chint32 lPart = 0 ) = 0 ;

		virtual GxVec3f  GetVertexNormal( chint32 lVertex, chint32 lFace = 0,
										   chint32 lPart = 0 )  = 0 ;
} ;

class QvState ;
class QvCube ;
class QvCone ;
class QvCylinder ;
class QvSphere ;
class QvIndexedFaceSet ;

//
// A QvCube has 1 part, 6 faces and 8 vertices. Note that GetPartNormal
// and GetVertexNormal do not make much sense for a cube. GetPartNormal
// simply returns the normal of the first face. GetVertexNormal will
// always return a face normal of the face specified. It does not check
// to make sure that the vertex indeed belongs to the face.
//
class ChQvCubeNormals : public ChQvNormalMap
{
	public:
		ChQvCubeNormals( QvCube* cube, QvState* state ) ;
		virtual ~ChQvCubeNormals() ;

		virtual chint32   GetNumParts() ;

		virtual chint32   GetNumFaces( chint32 lPart = 0 ) ;

		virtual chint32   GetNumVertices( chint32 lFace = 0,
										  chint32 lPart = 0 ) ;


		virtual GxVec3f  GetPartNormal( chint32 lPart ) ;

		virtual GxVec3f  GetFaceNormal( chint32 lFace, chint32 lPart = 0 ) ;

		virtual GxVec3f  GetVertexNormal( chint32 lVertex, chint32 lFace = 0,
										   chint32 lPart = 0 )  ;

	protected:
		//
		// Six normals for six faces, we need only keep one static table
		//
		static GxVec3f m_pNormals[6] ;
} ;

//
// A QvCone has two parts the - the cone itself and the base. The cone is
// subdivided into subdiv faces. The cone part has subdiv faces and
// subdiv+1 vertices. The base is also subdivided accordingly and has
// equal number of faces and vertices. The minimum value for subdiv is 3.
// However the normals along the subdivided faces of the base point along
// the same direction so we maintain only one base normal.
//
class ChQvConeNormals : public ChQvNormalMap
{
	public:
		ChQvConeNormals( QvCone* cone, QvState* state, chint32 subdiv ) ;
		virtual ~ChQvConeNormals() ;

		virtual chint32   GetNumParts() ;

		virtual chint32   GetNumFaces( chint32 lPart = 0 ) ;

		virtual chint32   GetNumVertices( chint32 lFace = 0,
										  chint32 lPart = 0 ) ;


		virtual GxVec3f  GetPartNormal( chint32 lPart ) ;

		virtual GxVec3f  GetFaceNormal( chint32 lFace, chint32 lPart = 0 ) ;

		virtual GxVec3f  GetVertexNormal( chint32 lVertex, chint32 lFace = 0,
										   chint32 lPart = 0 )  ;

	protected:
		static GxVec3f m_pBaseNormal ;
		chint32			m_pSubDivision ;
		GxVec3f*		m_pFaceNormals ;
		GxVec3f*		m_pVertexNormals ;
} ;

//
// A QvCylinder has two parts the - the cylinder itself and two bases.
// Each part is subdivided into subdiv faces. The cylinder part has
// 2*subdiv vertices whereas each base has subdiv+1 vertices. The
// subdivision is performed radially.The minimum value for subdiv is 4.
// Similar to the cone above all the faces of a base have only one normal.
//
class ChQvCylinderNormals : public ChQvNormalMap
{
	public:
		ChQvCylinderNormals( QvCylinder* cylinder, QvState* state, chint32 subdiv ) ;
		virtual ~ChQvCylinderNormals() ;

		virtual chint32   GetNumParts() ;

		virtual chint32   GetNumFaces( chint32 lPart = 0 ) ;

		virtual chint32   GetNumVertices( chint32 lFace = 0,
										  chint32 lPart = 0 ) ;


		virtual GxVec3f  GetPartNormal( chint32 lPart ) ;

		virtual GxVec3f  GetFaceNormal( chint32 lFace, chint32 lPart = 0 ) ;

		virtual GxVec3f  GetVertexNormal( chint32 lVertex, chint32 lFace = 0,
										   chint32 lPart = 0 )  ;

	protected:
		static GxVec3f	m_pBaseNormals[2] ;
		chint32			m_pSubDivision ;
		GxVec3f*		m_pFaceNormals ;
		GxVec3f*		m_pVertexNormals ;
} ;


#ifdef MY_NOTYET

//
// I have not yet decided upon the tessellation scheme for the sphere.
// However it will have one part and f(subdiv) faces and g(subdiv) vertices.
//
class ChQvSphereNormals : public ChQvNormalMap
{
	public:
		ChQvSphereNormals( QvSphere* sphere, QvState* state ) ;
		virtual ~ChQvSphereNormals() ;

		virtual chint32   GetNumParts() ;

		virtual chint32   GetNumFaces( chint32 lPart = 0 ) ;

		virtual chint32   GetNumVertices( chint32 lFace = 0,
										  chint32 lPart = 0 ) ;


		virtual GxVec3f  GetPartNormal( chint32 lPart ) ;

		virtual GxVec3f  GetFaceNormal( chint32 lFace, chint32 lPart = 0 ) ;

		virtual GxVec3f  GetVertexNormal( chint32 lVertex, chint32 lFace = 0,
										   chint32 lPart = 0 )  ;

	protected:
		chint32   m_NumSphereNormals ;
		GxVec3f* m_SphereNormals ;
} ;

#endif

//
// The normal helper classes do not gain anything by having a common
// base. At least IFS normals is an altogether different beast. This
// is constructed with an IFS and a state and is expected to be cached.
// The IFS and state can be set independantly. This allows the same
// instance to handle varying traversal states from one to traversal
// to another, and default normals are computed only once. However if the
// IFS itself changes, then it may be set once again, destroying the
// computed normals.
//
// The usage is also a little complicated, it provides three queries,
// isPerFace?, isPerVertex? and isDefault, there are corresponding methods
// which must be used for getting the normal. For example if isPerFace
// returns true, then GetFaceNormal should be used once per face with the
// current face number as the input argument. This seperation of the various
// Get*Normal methods is necessary to maintain a balance between flexibility
// and runtime efficiency.
//
class ChQvIndexedFaceSetNormals
{
   public:
	  inline ChQvIndexedFaceSetNormals( QvIndexedFaceSet* ifs, QvState* state )
	  {
		 Init() ;
		 Set( ifs ) ;
		 Set( state ) ;
	  }

	  // Non-virtual destructor, change if deriving subclasses
	  inline ~ChQvIndexedFaceSetNormals() { Destroy() ; }

	  bool Set( QvIndexedFaceSet* ifs ) ;
	  bool Set( QvState* state ) ;

	  inline bool IsPerFace() const { return m_perFace ; }
	  inline bool IsPerVertex() const { return m_perVertex ; }
	  inline bool IsDefault() const { return m_default ; }

	  inline bool GetFaceNormal( chint32 lFace,  GxVec3f& normal ) const
	  {
		 if ( !m_perFace ) return false ;
		 else
		 {
			long inx = ( m_indexed ? m_pIndices[lFace] : lFace ) ;
			normal = m_pNormals[inx] ;
			return true ;
		 }
	  }

	  inline bool GetVertexNormal( chint32 lVertex, GxVec3f& normal ) const
	  {
		 if ( !m_perVertex ) return false ;
		 {
			long inx = ( m_indexed ? m_pIndices[lVertex] : lVertex ) ;
			normal = m_pNormals[inx] ;
			return true ;
		 }
	  };

	  inline bool GetDefaultNormal( chint32 lIndex, chint32 lFace,
									GxVec3f& normal ) const
		{
			chuint32 flag;
			return GetDefaultNormal(lIndex, lFace, normal, flag);
		};

	  inline bool GetDefaultNormal( chint32 lIndex, chint32 lFace,
									GxVec3f& normal, chuint32& flag ) const
	  {
		 if ( !m_default ) return false ;
		 else
		 {
			normal = m_pNormals[lIndex-lFace] ;
			flag = m_pFlags[lIndex-lFace];
			return true ;
		 }
	  };

   private:
	  QvIndexedFaceSet* m_pIFS ;
	  QvState*          m_pState ;

	  bool              m_indexed ;
	  long*             m_pIndices ;
	  GxVec3f*         m_pNormals ;

	  bool              m_perVertex ;
	  bool              m_perFace ;
	  bool              m_default ;

	  chint32           m_numFaces ;
	  chint32           m_numDefaultNormals ;
	  GxVec3f*         m_pDefaultNormals ;
	  chuint32*			m_pFlags;

	  inline void Init()
	  {
		 m_pIFS = 0 ; m_pState = 0 ;
		 m_indexed = false ; m_pIndices = 0 ; m_pNormals = 0 ;
		 m_perFace = m_perVertex = m_default = false ;
		 m_numFaces = 0 ;
		 m_numDefaultNormals = 0 ; m_pDefaultNormals = 0 ;
		 m_pFlags = 0;
	  }

	  inline void Destroy()
	  {
		 m_pIFS = 0 ; m_pState = 0 ;
		 m_indexed = false ; m_pIndices = 0 ; m_pNormals = 0 ;
		 m_perFace = m_perVertex = m_default = false ;
		 m_numFaces = 0 ;
		 m_numDefaultNormals = 0 ;
		 delete[] m_pDefaultNormals ; m_pDefaultNormals = 0 ;
		 delete[] m_pFlags ; m_pFlags = 0 ;
	  }		 
} ;

#endif	// !defined( _CHQVNORMALMAP_H )

// Local Variables: ***
// tab-width:4 ***
// End: ***

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产欧美精品在线观看| 日韩精品每日更新| 日韩在线a电影| 成人国产电影网| 精品免费日韩av| 亚洲国产成人高清精品| 成人av资源网站| 久久先锋影音av| 青青国产91久久久久久| 欧美伊人久久久久久午夜久久久久| 久久久久久久久97黄色工厂| 丝袜美腿高跟呻吟高潮一区| 欧美色中文字幕| 伊人一区二区三区| 97精品视频在线观看自产线路二| 精品对白一区国产伦| 麻豆国产一区二区| 91精品国产综合久久久久久久| 亚洲精品国产品国语在线app| 成人免费看的视频| 久久免费国产精品| 国产精品18久久久久久久网站| 69av一区二区三区| 日本三级亚洲精品| 这里是久久伊人| 亚洲成人av一区| 欧美片网站yy| 日本中文字幕不卡| 日韩无一区二区| 日本欧美加勒比视频| 91精品在线免费| 老司机午夜精品| 精品88久久久久88久久久| 日本不卡高清视频| 日韩精品综合一本久道在线视频| 日韩电影在线一区| 欧美电影免费观看高清完整版| 毛片av一区二区三区| 久久无码av三级| 成人一道本在线| 日韩毛片精品高清免费| 日本丰满少妇一区二区三区| 一区二区三区美女视频| 欧美吞精做爰啪啪高潮| 蜜臀久久久99精品久久久久久| 日韩欧美www| 国产91精品久久久久久久网曝门 | 美女一区二区视频| 日韩欧美一区二区久久婷婷| 国产在线精品一区二区夜色| 欧美激情艳妇裸体舞| 色域天天综合网| 蜜臀久久99精品久久久久宅男| 精品国产免费久久| av不卡免费在线观看| 亚洲国产日韩一区二区| 日韩女优毛片在线| eeuss鲁片一区二区三区在线观看 eeuss鲁片一区二区三区在线看 | 欧美乱熟臀69xxxxxx| 久久精品av麻豆的观看方式| 一区二区三区免费| 日韩欧美一级特黄在线播放| 国产精品99久久久| 亚洲成人av电影| 中文字幕不卡在线观看| 欧美日韩五月天| 成人黄色777网| 免费精品视频在线| 综合av第一页| 日韩精品一区二区三区四区视频 | 久久99热99| 亚洲欧美区自拍先锋| 欧美一二三在线| 91成人免费电影| 国产在线观看一区二区| 亚洲成a人片在线观看中文| 久久久久久久久久久久久夜| 欧美影院精品一区| 成人毛片老司机大片| 日韩1区2区3区| 一区二区三区免费在线观看| 久久久99精品免费观看| 5月丁香婷婷综合| 欧美在线观看视频一区二区| 国产毛片一区二区| 日本亚洲视频在线| 亚洲女同ⅹxx女同tv| 26uuu国产一区二区三区| 日本久久一区二区| 懂色av中文字幕一区二区三区| 日韩avvvv在线播放| 亚洲午夜av在线| 亚洲综合在线免费观看| 国产精品乱码久久久久久 | 欧美精品123区| 91美女片黄在线观看91美女| 国产91精品在线观看| 国产乱子伦视频一区二区三区| 日韩在线一二三区| 亚洲成年人网站在线观看| 一区二区三区免费在线观看| 综合欧美亚洲日本| 日韩毛片视频在线看| 国产精品欧美一级免费| 欧美高清一级片在线观看| 欧美成人精品福利| 精品精品欲导航| 欧美一区二区精品在线| 欧美精品色综合| 欧美一级在线免费| 日韩亚洲欧美综合| 欧美成人高清电影在线| 欧美精品一区在线观看| 久久久国产午夜精品| 久久久蜜桃精品| 国产区在线观看成人精品| 久久久久久久久99精品| 中文字幕乱码一区二区免费| 欧美国产日本视频| 亚洲视频在线观看三级| 亚洲日本乱码在线观看| 亚洲国产欧美一区二区三区丁香婷| 亚洲最快最全在线视频| 天堂资源在线中文精品| 日韩中文字幕亚洲一区二区va在线| 亚洲国产乱码最新视频| 不卡的电视剧免费网站有什么| 国产电影一区在线| 91免费国产在线观看| 色婷婷精品大在线视频| 欧美日韩二区三区| 精品久久人人做人人爱| 欧美韩国一区二区| 亚洲黄网站在线观看| 日韩综合小视频| 国产一二精品视频| 94-欧美-setu| 欧美电影在哪看比较好| 久久久天堂av| 一区二区日韩av| 国内精品自线一区二区三区视频| 成人小视频在线观看| 日本丰满少妇一区二区三区| 日韩欧美国产综合一区 | 久久综合五月天婷婷伊人| 中文字幕+乱码+中文字幕一区| 一区二区三区四区激情| 日本不卡不码高清免费观看| 丁香一区二区三区| 欧美日韩国产经典色站一区二区三区| 亚洲精品一线二线三线| 亚洲在线视频网站| 国产成人欧美日韩在线电影| 欧美色男人天堂| 日本一区免费视频| 强制捆绑调教一区二区| 成人免费高清在线观看| 51精品国自产在线| 亚洲人成亚洲人成在线观看图片| 蜜桃av噜噜一区二区三区小说| 色综合久久久久综合| 精品久久久久一区二区国产| 一区二区三区免费在线观看| 国产福利精品一区二区| 91麻豆精品国产91久久久资源速度| 国产精品视频免费看| 美女爽到高潮91| 欧美影院一区二区三区| 亚洲国产精品成人综合| 久色婷婷小香蕉久久| 欧美日韩一区二区三区视频| 中文字幕一区不卡| 国产成人激情av| 久久久久综合网| 免费看日韩精品| 9191国产精品| 一区二区三区在线视频观看58| 国产91综合一区在线观看| 日韩免费观看2025年上映的电影| 亚洲综合视频在线| 色88888久久久久久影院野外| 久久久久国产免费免费 | 91视视频在线直接观看在线看网页在线看| 欧美一级理论片| 热久久国产精品| 欧美一区二区国产| 日韩电影在线免费看| 欧美日韩高清一区二区| 亚洲一区二区三区四区不卡| 99精品视频一区二区三区| 欧美国产一区二区在线观看| 国产一区二区三区精品欧美日韩一区二区三区 | 中文字幕不卡在线观看| 国产999精品久久久久久绿帽| 久久精品视频免费| 国产精品一区二区无线| 亚洲一区视频在线| 欧美日韩在线直播| 亚洲成人一区二区在线观看| 欧美日韩二区三区|