Jump to content
AggrorJorn

(Solved) Documentation error

Recommended Posts

Generating the lua snippets brings up several issues with the toc. The lights and probe API are placed inside the camera.

image.png.5505ef980ba17e61f487ee90ad08524b.png

Share this post


Link to post

I think that is correct. The Light and Probe classes are inherited from Camera class which makes perfect sence as both need the same behaviour as a camera.

I am trying to generate a intellisense implementation by myself and i have come across this: https://www.leadwerks.com/documentation/API-Reference.xml

This seems to contain all classes available in Leadwerks and is easier to parse than the toc.xml, 

Share this post


Link to post

Thanks for the reply klepto. Interesting to know it inherits. It makes sense for methods like SetRange, but there are also many camera specific methods that have nothing to do with lights like Zoom and SetSkybox. Are there inherited by the Light and probe?

I currently process the entire toc.xml because I need more than just the classes. For instance I want to display available subclasses and methods.

Share this post


Link to post

Well, sure the Skybox might not be needed for Lights, but is needed for Probes. In general the Camera provides functions to render the scene and this is needed for probes and shadowmaps. 

You get all the info with the API-reference.xml as well.  the filename usually looks like this: 

API-Reference_Object_Entity_Camera_Light_DirectionalLight

Strip the beginning and split by _, then you get the whole hierarchy of the class. In some cases there is a something like Object_Math_AABB where Math is not a real class, but if you register all class names before parsing the actual class you can identify these and ignore those 'pseudo' classes. 

 

Share this post


Link to post

All the camera culling and rendering routines are used by lights when they render shadows. I did not want to create an extra camera entity associated with each light.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...