This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Matrix MatrixTransform | |
{ | |
set | |
{ | |
if (Parameters["MatrixTransform"] != null) | |
Parameters["MatrixTransform"].SetValue(value); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
namespace Virtex.Lib.Vrtc.Graphics | |
{ | |
public interface vxPostProcessorInterface | |
{ | |
void SetResoultion(); | |
void LoadContent(); | |
void Apply(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reset the Bounding Sphere's Center Position | |
BoundingShape.Center = Vector3.Transform(ModelCenter, World); | |
// Now Check if this entity is even in view of the camera | |
IsInCameraViewFrustum = Camera.IsInViewFrustrum(BoundingShape); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public bool IsInViewFrustrum(BoundingSphere boundingSphere) | |
{ | |
return BoundingFrustum.Intersects(boundingSphere); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public static BoundingSphere GetModelBoundingSphere(Model model) | |
{ | |
// Initialize minimum and maximum corners of the bounding box to max and min values | |
Vector3 min = new Vector3(float.MaxValue, float.MaxValue, float.MaxValue); | |
Vector3 max = new Vector3(float.MinValue, float.MinValue, float.MinValue); | |
// For each mesh of the model | |
foreach (ModelMesh mesh in model.Meshes) | |
{ | |
foreach (ModelMeshPart meshPart in mesh.MeshParts) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EffectParameterCollection parameters = xEngine.Assets.PostProcessShaders.CartoonEdgeDetection.Parameters; | |
Vector2 resolution = new Vector2(RT_MainScene.Width, | |
RT_MainScene.Height); | |
// Pass in the current screen resolution. | |
parameters["ScreenResolution"].SetValue(resolution); | |
parameters["NormalTexture"].SetValue(RT_NormalMap); | |
parameters["DepthTexture"].SetValue(RT_DepthMap); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void wxOCEWindow::CreateBottle() | |
{ | |
TopoDS_Shape aBottle=MakeBottle(150,210,90); | |
Handle(AIS_Shape) AISBottle=new AIS_Shape(aBottle); | |
myContext->SetMaterial(AISBottle,Graphic3d_NOM_GOLD); | |
myContext->SetDisplayMode(AISBottle,1,Standard_False); | |
myContext->Display(AISBottle, Standard_False); | |
DoZoomFit(); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void wxOCEWindow::OnIdle(wxIdleEvent& event) | |
{ | |
mView->MustBeResized(); // if the user changes the window size | |
mView->Redraw(); | |
} | |
void wxOCEWindow::OnSize(wxSizeEvent& event) | |
{ | |
int width, height; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class wxOCEWindow: public wxScrolledWindow | |
{ | |
public: | |
wxOCEWindow(wxWindow *parent, const wxPoint& pos, const wxSize& size, long style); | |
... | |
TCollection_ExtendedString a3DName ("Visu3D"); | |
//Create the Global wxPanel too hold the wxOCE Control |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//////////////////////////// VARIABLES ///////////////////////////// | |
//The OCE Window | |
Handle(Xw_Window) wind; | |
//The Panel which holds the OCE Window | |
wxPanel* ctrl ; | |
//Used for connecting too the Graphics Card |