📄 oxnewtonstaticobjects.pas
字号:
unit oxNewtonStaticObjects;
{******************************************************************************}
// [15-9-2007]: oxNewtonStaticObjects last change by Dave Gravel. //
{******************************************************************************}
{===============================================================================
Version: MPL 1.1
The contents of this file are subject to the Mozilla Public License Version
1.1 (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.mozilla.org/MPL/
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 "oxNewton opengl-Dynamics-delphi-component".
The Initial Developer of the Original Code is
Dave Gravel, OrionX3D Opengl & Delphi Programming, dave.gravel@cgocable.ca.
http://www.Dave.ServeUsers.com
http://www.k00m.sexidude.com
Portions created by Dave Gravel are Copyright (C) 2004 - 2006.
Dave Gravel. All Rights Reserved.
Contributor(s): GLScene (http://www.glscene.org) -
Julio Jerez and Alain Suero (http://www.newtondynamics.com) -
Sascha Willems (www.delphigl.de)
================================================================================
oxNewton v1.55 by Dave Gravel.
PS: I request only one thing from the users of my oxNewton Component,
it is to put on your about or your help a comment saying you using the
oxNewton Component with my name Dave Gravel and my
e-mail: dave.gravel@cgocable.ca
Don't modify or remove any comment or information on my file
if you do some modification on my code please contact me.
Read the Newton license too, it is realy important.
================================================================================}
interface
{******************************************************************************}
// [15-9-2007]: oxNewtonStaticObjects last change by Dave Gravel. //
{******************************************************************************}
uses
// Windows
Forms, Windows, Classes, Messages, SysUtils, Graphics, Controls, ExtCtrls,
Dialogs, StdCtrls,
// GLScene
GLScene, GLMisc, GLObjects, VectorGeometry, GLVectorFileObjects, VectorLists,
GLTexture, GLGeomObjects, VectorTypes, TGA, GLFileSMD, JPEG,
// Newton
oxNewtonUtils, oxNewtonManager, oxNewtonJoint, oxNewtonImport;
{******************************************************************************}
// [15-9-2007]: TOXNewtonStaCube last change by Dave Gravel. //
{******************************************************************************}
type
TOXNewtonStaCube = class( TGLCube )
private
FOrionX3D: byte;
FOXVisual: boolean;
FActived: boolean;
FManager: TOXNewtonManager;
FCollision: PNewtonCollision;
FBody: PNewtonBody;
FContactID: integer;
FMaterialCustom: boolean;
FOnStepRender: TOXOnStepRender;
function GetGeom: PNewtonCollision;
function GetBody: PNewtonBody;
public
property Manager: TOXNewtonManager read FManager;
property Actived: boolean read FActived;
procedure UpdateTransformation;
procedure InitNewton; virtual;
procedure BuildList( var rci: TRenderContextInfo ); override;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
procedure DoProgress( const progressTime: TProgressTimes ); override;
property Geom: PNewtonCollision read GetGeom;
property Body : PNewtonBody read GetBody;
property ContactID: integer read FContactID write FContactID;
constructor Create( AOwner: TComponent ); override;
destructor Destroy; override;
protected
//
published
property OXVisual: boolean read FOXVisual write FOXVisual;
property OnStepRender: TOXOnStepRender read FOnStepRender write FOnStepRender;
end;
{******************************************************************************}
// [15-9-2007]: TOXNewtonStaSphere last change by Dave Gravel. //
{******************************************************************************}
type
TOXNewtonStaSphere = class( TGLSphere )
private
FOrionX3D: byte;
FOXVisual: boolean;
FActived: boolean;
FManager: TOXNewtonManager;
FCollision: PNewtonCollision;
FBody: PNewtonBody;
FContactID: integer;
FMaterialCustom: boolean;
FExtentScale: boolean;
FOnStepRender: TOXOnStepRender;
function GetGeom: PNewtonCollision;
function GetBody: PNewtonBody;
public
property Manager: TOXNewtonManager read FManager;
property Actived: boolean read FActived;
procedure UpdateTransformation;
procedure InitNewton; virtual;
procedure BuildList( var rci: TRenderContextInfo ); override;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
procedure DoProgress( const progressTime: TProgressTimes ); override;
property Geom: PNewtonCollision read GetGeom;
property Body: PNewtonBody read GetBody;
property ContactID: integer read FContactID write FContactID;
constructor Create( AOwner: TComponent ); override;
destructor Destroy; override;
published
property OXVisual: boolean read FOXVisual write FOXVisual;
property ExtentScale: boolean read FExtentScale write FExtentScale;
property OnStepRender: TOXOnStepRender read FOnStepRender write FOnStepRender;
end;
{******************************************************************************}
// [15-9-2007]: TOXNewtonStaCylinder last change by Dave Gravel. //
{******************************************************************************}
type
TOXNewtonStaCylinder = class( TGLCylinder )
private
FOrionX3D: byte;
FOXVisual: boolean;
FActived: boolean;
FManager: TOXNewtonManager;
FCollision: PNewtonCollision;
FBody: PNewtonBody;
FContactID: integer;
FMaterialCustom: boolean;
FOnStepRender: TOXOnStepRender;
function GetGeom: PNewtonCollision;
function GetBody: PNewtonBody;
public
property Manager: TOXNewtonManager read FManager;
property Actived: boolean read FActived;
procedure UpdateTransformation;
procedure InitNewton; virtual;
procedure DoProgress( const progressTime: TProgressTimes ); override;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
procedure BuildList( var rci: TRenderContextInfo ); override;
property Geom: PNewtonCollision read GetGeom;
property Body: PNewtonBody read GetBody;
property ContactID: integer read FContactID write FContactID;
constructor Create( AOwner: TComponent ); override;
destructor Destroy; override;
published
property OXVisual: boolean read FOXVisual write FOXVisual;
property OnStepRender: TOXOnStepRender read FOnStepRender write FOnStepRender;
end;
{******************************************************************************}
// [15-9-2007]: TOXNewtonStaCCylinder last change by Dave Gravel. //
{******************************************************************************}
type
TOXNewtonStaCCylinder = class( TGLCylinder )
private
FOrionX3D: byte;
FOXVisual: boolean;
FActived: boolean;
FManager: TOXNewtonManager;
FCollision: PNewtonCollision;
FBody: PNewtonBody;
FContactID: integer;
FCap1: TGLSphere;
FCap2: TGLSphere;
FMaterialCustom: boolean;
FOnStepRender: TOXOnStepRender;
function GetGeom: PNewtonCollision;
function GetBody: PNewtonBody;
function GetCap1 : TGLSphere;
function GetCap2 : TGLSphere;
public
property Manager: TOXNewtonManager read FManager;
property Actived: boolean read FActived;
procedure UpdateTransformation;
procedure InitNewton; virtual;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
procedure DoProgress( const progressTime: TProgressTimes ); override;
procedure BuildList( var rci: TRenderContextInfo ); override;
property Geom: PNewtonCollision read GetGeom;
property Body: PNewtonBody read GetBody;
property Cap1 : TGLSphere read GetCap1;
property Cap2 : TGLSphere read GetCap2;
property ContactID: integer read FContactID write FContactID;
constructor Create( AOwner: TComponent ); override;
destructor Destroy; override;
published
property OXVisual: boolean read FOXVisual write FOXVisual;
property OnStepRender: TOXOnStepRender read FOnStepRender write FOnStepRender;
end;
{******************************************************************************}
// [15-9-2007]: TOXNewtonStaChamferCylinder last change by Dave Gravel. //
{******************************************************************************}
TOXNewtonStaChamferCylinder = class( TGLTorus )
private
FOrionX3D: byte;
FOXVisual: boolean;
FActived: boolean;
FManager: TOXNewtonManager;
FCollision: PNewtonCollision;
FBody: PNewtonBody;
FContactID: integer;
FMaterialCustom: boolean;
FOnStepRender: TOXOnStepRender;
function GetGeom: PNewtonCollision;
function GetBody: PNewtonBody;
public
property Manager: TOXNewtonManager read FManager;
property Actived: boolean read FActived;
procedure UpdateTransformation;
procedure InitNewton; virtual;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
procedure DoProgress( const progressTime: TProgressTimes ); override;
procedure BuildList( var rci: TRenderContextInfo ); override;
property Geom: PNewtonCollision read GetGeom;
property Body: PNewtonBody read GetBody;
property ContactID: integer read FContactID write FContactID;
constructor Create( AOwner: TComponent ); override;
destructor Destroy; override;
published
property OXVisual: boolean read FOXVisual write FOXVisual;
property OnStepRender: TOXOnStepRender read FOnStepRender write FOnStepRender;
end;
{******************************************************************************}
// [15-9-2007]: TOXNewtonStaCone last change by Dave Gravel. //
{******************************************************************************}
type
TOXNewtonStaCone = class( TGLCone )
private
FOrionX3D: byte;
FOXVisual: boolean;
FActived: boolean;
FManager: TOXNewtonManager;
FCollision: PNewtonCollision;
FBody: PNewtonBody;
FContactID: integer;
FMaterialCustom: boolean;
FOnStepRender: TOXOnStepRender;
function GetGeom: PNewtonCollision;
function GetBody: PNewtonBody;
public
property Manager: TOXNewtonManager read FManager;
property Actived: boolean read FActived;
procedure UpdateTransformation;
procedure InitNewton; virtual;
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
procedure DoProgress( const progressTime: TProgressTimes ); override;
procedure BuildList( var rci: TRenderContextInfo ); override;
property Geom: PNewtonCollision read GetGeom;
property Body: PNewtonBody read GetBody;
property ContactID: integer read FContactID write FContactID;
constructor Create( AOwner: TComponent ); override;
destructor Destroy; override;
published
property OXVisual: boolean read FOXVisual write FOXVisual;
property OnStepRender: TOXOnStepRender read FOnStepRender write FOnStepRender;
end;
{******************************************************************************}
// [15-9-2007]: TOXNewtonStaCompound last change by Dave Gravel. //
{******************************************************************************}
type
TOXNewtonStaCompound = class( TGLSceneObject )
private
FOrionX3D: byte;
FOXVisual: boolean;
FActived: boolean;
FManager: TOXNewtonManager;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -