How to check BoundingSphere for one ModelBone? - xna-4.0

Like this title question. How to check BoundingSphere for one ModelBone in XNA 4.0??

One ModelBone is one mesh in model. You need determined mesh to check and use property: mesh.BoundingSphere to check ModelBone you want to check.

Related

Highlight buildings in a map

I have a requirement where I need to highlight the buildings around my current location on a map. I am using Xamarin and was wondering if anyone can point me to a correct library or control that can fulfill my requirement.
I am currently using Mapsui for Xamarin but I don't think it has the feature I am looking for.
If you have access to the geometries of the buildings there are many ways you could implement highlighting.
One way that comes to mind. Create a layer on top of your background layer with the same geometries as data source. Use a ThemeStyle to show only the selected geometry. The ThemeStyle class is created with a callback method which determines the style. In that method you should return no style unless the feature id is the same as selected feature id.
You can take a look at the ThemeStyle sample for a more general use of themes (no highlighting).
Also you could look at Mapsui.Sample.Wpf.Editing. Here is a screenshot of that sample:

WebAudio changing of orientation of Listener and/or Panner

I am trying to understand how the WebAudio API would work. I have two objects; one representing the listener and one the source. And have used the below link as an example. I am able to move the source and the sound position changes.
https://mdn.github.io/webaudio-examples/panner-node/
The command to change the orientation has been provided: viz this.panner.setOrientation or this.listener.setOrientation. The question I have is: if I have a source or listener object (in canvas mode using ThreeJS viz. we know its position and rotation) how do I change the orientation of either the panner or listener (as the case may be) via JS.
An example would greatly help. Thanks
Any reason not to use THREE's PositionalAudio object? https://threejs.org/docs/index.html#api/audio/PositionalAudio. That lets you add a sound to mesh object, and THREE will take care of moving it. If you want to source a different sound than an AudioBuffer, just connect the audio source to the .gain of the PositionalAudio object.

Rhino3D: how to use the object created later after closing grasshopper

I am new to Grasshopper. I did a very simple thing today and made a nice mesh. How can I use the mesh created?
While Grasshopper is open I can make no changes to the created mesh in Rhino3D. However, closing Grasshopper will make the object (mesh) disappear.
Am I missing a step? I need to continue manipulating the object created by Grasshopper.
Thank you.
It depends on what you mean by "use the mesh".
As suggested in a comment, you can right-click the component that produces the final mesh, then click Bake.
You may find that you get faster and more informed answers about Grasshopper at https://discourse.mcneel.com/c/grasshopper

Original skeleton position (Fbx import)

I was thinking that you need a deformer to read the clusters etc to be able to get the original (usually T pose) position of the skeleton.
Also FBX supports poses etc but never had a file that implemented it.
But my surprise was that importing an fbx file into 3dsmax without any mesh inside if I uncheck "animation" I get the T pose.
Any idea about it?
Thank you in adavnce
FbxCluster has GetTransformMatrix and GetTransformLinkMatrix. The former returns the original transform of the bone (that should be used to initialize the skinning), and the latter the corresponding orientation of the skinned node. Additionally, the skin node can also have "geometric rotation". I don't think there's anything more than that.

object importing in Three.js

http://victorribeiro.com/modelo3D
If you take a look at the example above, you can see a low poly model in .obj format with some texture baked on it. My question is:
Is there a way that I import this same model, apply on material on the body and another material on the eyes? If you look close, you will see it's the same model with 3 elements: 1 body and 2 eyes.
Thanks a lot.
If you could separate your model into the three elements then you would be able to do what you want. I looked at pig.obj and there is now way to distinguish the different elements. You only have one group in the model file defined. If you could also export material then your elements would be named and in your traverse function you could also check the name of the element.

Resources