TylerH Posted July 18, 2010 Share Posted July 18, 2010 I am mainly consolidating some existing requests by Masterxilo, combined with some requests of mine because these are 100% crucial to having a fully OO wrapper and framework for Leadwerks. These should have been in from the beginning, and are trivial to add (I could add them to the DLL source in a few hours). These are the functions that need added (alphabetical by class): Body GetBodyGravityMode GetBodyDamping GetBodyMassCenter GetBodyElasticity GetBodySoftness GetBodyFriction GetBodyBuoyancyMode GetBodyStepMode GetBodyTorque GetBodyForce Camera GetCameraClearColor GetCameraProjMode GetCameraZoom GetCameraClearMode Corona GetCoronaRadius Emitter GetEmitterVelocity GetEmitterAcceleration GetEmitterArea GetEmitterRadius GetEmitterRotationSpeed GetEmitterWaver GetEmitterCycleMode (this is set in the constructor) GetEmitterLifeTime (this is set in the constructor) SetEmitterLifeTime (would be nice to be able to change this after creation) Entity GetEntityColor GetEntityViewRange GetEntityOcclusionMode GetEntityShadowRange GetEntityShadowMode SetEntityQuat (this would make IK much more efficient) Joint GetHingeJointLimits GetSliderJointLimits GetBallJointLimits GetJointStiffness GetJointCollisionMode Light GetLightFalloff GetLightConeAngles GetShadowmapSize GetShadowOffset GetShadowSoftness GetShadowDistance Shader GetShaderXXX (for all SetShaderXXX commands) Source GetSourceVolume GetSourcePitch GetSourceRange GetSourcePosition Terrain GetTerrainTexture GetTerrainTextureScale GetTerrainTextureRotation GetTerrainMappingMode GetTerrainTextureConstraints Vehicle SetTireMatrix World GetPhysicsQuality GetWorldGravity GetWorldSize GetFluidPlane GetFluidViscosity GetFluidDensity GetEntities GetMeshes GetModels GetEmitters GetTerrains GetCoronas GetBodies GetListeners GetCameras GetPivots GetJoints GetControllers 2 Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
Roland Posted July 18, 2010 Share Posted July 18, 2010 I agree with this completely. Get and Set are clear and easy to understand. and impossible to misunderstand. When I wrote LEO I did follow the Get/Set notation and was back then amazed that this simple set of rule was not implemented from start. Quote Roland Strålberg Website: https://rstralberg.com Link to comment Share on other sites More sharing options...
Masterxilo Posted July 22, 2010 Share Posted July 22, 2010 100% support this request. But I'm not quite sure whether the commands should start with Get/Set in the c api... BodyGet... and TerrainGet... would be easier to find by "accident" when learning the commandset by looking trough intellisense. That syntax would be more similar to the oop terrain.Get...(); But yes, those functions are really needed. Quote Hurricane-Eye Entertainment - Site, blog. Link to comment Share on other sites More sharing options...
Canardia Posted July 23, 2010 Share Posted July 23, 2010 Generally in OOP, the method name should always start with a verb, followed by the object. Get/Set are good where things are really getted and setted, those are usually values. Other good verbs are Turn, Rotate, Flip, Render, Update, Scale, Load, Save, etc... The only exception to using verb as first word are prepositions, which are used to get boolean values, like Is, Has, Can, May, etc... Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
L B Posted July 24, 2010 Share Posted July 24, 2010 +∞ The only exception to using verb as first word are prepositions, which are used to get boolean values, like Is, Has, Can, May, etc... Is, Has, Can and May are verbs, not prepositions. Quote Link to comment Share on other sites More sharing options...
L B Posted July 24, 2010 Share Posted July 24, 2010 I would add the following categories: Gets in the framework, extremely useful for option dialogs (effects, etc). Gets in the graphics, extremely useful for option dialogs (resizing, etc). I know it is possible for me to store whether effect X has been enabled, and keep that variable, but it is theoretically bad practice as such value could be changed without my application getting notified, leading to unexpected behavior. It is only expectable to have a get where you have a set, and vice versa. Framework GetStats GetZoom GetSaturation GetBrightness GetContrast GetAntialias GetSSAO GetGodRays GetHDR GetBloom GetWater GetWaterAmplitude GetReflectionElements GetWaterVisibility GetWaterSoftness GetWaterColor GetWaterHeight GetWaterWaveSpeed GetDistanceFog GetDistanceFogColor GetDistanceFogAngle GetDistanceForRange GetBackgroundMode GetBackgroundColor GetSkybox GetNearDOF GetNearDOFStrength GetNearDOFRange GetFarDOF GetFarDOFStrength GetFarDOFRange Graphics GetWireframe GetOcclusionCulling GetHertz GetFlags GetDepth Quote Link to comment Share on other sites More sharing options...
TylerH Posted August 26, 2010 Author Share Posted August 26, 2010 All of these and more have been implemented in our custom engine DLL. Quote nVidia 530M Intel Core i7 - 2.3Ghz 8GB DDR3 RAM Windows 7 Ultimate (64x)----- Visual Studio 2010 Ultimate Google Chrome Creative Suite 5 FL Studio 10 Office 15 ----- Expert Professional Expert BMX Programmer ----- Link to comment Share on other sites More sharing options...
Scott Richmond Posted August 27, 2010 Share Posted August 27, 2010 All of these and more have been implemented in our custom engine DLL. Custom engine DLL? Quote Programmer, Modeller Intel Core i7 930 @ 3.5GHz | GeForce 480 GTX | 6GB DDR3 RAM | Windows 7 Premium x64 Visual Studio 2008 | Photoshop CS3 | Maya 2009 Website: http://srichnet.info Link to comment Share on other sites More sharing options...
L B Posted September 1, 2010 Share Posted September 1, 2010 Custom engine DLL? For the C# headers. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.